Repository navigation
0.9.11: back from a sleep, the chat is read at once - #48
Merged
Merged
Conversation
…at is read at once A read started before the phone locked could hang on a dead connection, and the poll waited on it (minutes) instead of looking again. The app's buses now go through readFetch: GET and GraphQL queries are given up when the app comes back after more than 5 s away (visibilitychange, and appStateChange on Android), and none waits more than 30 s for GitHub to start answering. Writes are left alone. Coming back also polls a few times a second apart, and the start asks for the repository and the head together.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A user reported that phone notifications arrived but the messages showed up late, especially after the screen had been off or locked.
Cause. A read started before the phone slept could hang on a connection that died in the meantime. The poll loop waited on that read (sometimes for minutes) instead of looking again.
wake()only ends the loop's sleep, so it can't free a tick that is stuck in a request.Fix.
readFetch, which covers GET requests and GraphQL queries:visibilitychange, plusappStateChangeon Android);/reposcheck and the watcher's head read together. The/reposerror is still the one shown.Tests.
resumesection intest/app.e2e.mjs: one head read hangs for 25 s, then the page goes hidden for 5.5 s and comes back. The message shows in 1.3 s. With the fix turned off it takes 19.5 s and the test fails.