Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@expo/cli] Close development session when CLI is stopped #17170

Merged
merged 4 commits into from
Apr 22, 2022

Conversation

FiberJW
Copy link
Contributor

@FiberJW FiberJW commented Apr 21, 2022

This is a rewrite of expo/expo-cli#4317 for the new CLI.

Why

Development Sessions shown in Expo Go can be "stale" (saying that they show up in the app when the Expo CLI session has been closed) for up to 3 minutes.

How

Expo CLI dev sessions can feel more up-to-date by calling /notify-close, which tells www to remove the dev session after the process is closed. This will update in Expo Go in the next polling request or when a user pull-to-refreshes like how it does for Snacks.

I also increased the force quit delay to account for the added network calls.

Test Plan

Open a project with a locally built copy of @expo/cli (nexpo) on this branch, observe that it shows up in Expo Go, then close the dev server, refresh Expo Go, and see that it doesn't show up anymore:

2022-04-21.16-31-08.mp4

@linear
Copy link

linear bot commented Apr 21, 2022

@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Apr 21, 2022
@FiberJW FiberJW marked this pull request as ready for review April 21, 2022 20:32
@FiberJW FiberJW requested a review from EvanBacon April 21, 2022 21:17
@EvanBacon EvanBacon merged commit edc9234 into main Apr 22, 2022
@EvanBacon EvanBacon deleted the fiberjw/eng-4740-close-dev-session-in-expo-cli-when branch April 22, 2022 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants