Repository navigation
fix(status): show "Can't reach the server" sooner when the server stops answering - #29
Merged
Merged
Conversation
…ps answering The status line only found out the server had gone when a listing of the root failed, and on a connection that just goes quiet that's four dials of about 21 s each, so a hung upload kept "Uploading X" up for around 90 s. The router now notes whether the account's server answers every request, and the line switches once there have been two failures in a row (or one dial nobody answered) and the first is 10 s old. A single blip that a retry gets through never shows, and any answer clears it.
…its send Testing on the VM, a 30 MB upload that had been running for a minute failed 20 s after the network went, and because the clock started when that request was sent, the line went to "Can't reach the server" on that one failure. A single reset of a long upload would have flashed it even when the retry went straight through. The 10 s now counts from when the first failure comes back, and a request that waited that long before failing counts as two failures rather than skipping the wait.
…ch-the-server-sooner # Conflicts: # cmd/nimbo-gui/now_test.go
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.
The status line only switched to "Can't reach the server" once a root listing failed, which on a connection that goes quiet takes about 90 s, so a hung upload kept "Uploading X" up meanwhile. The router now notes whether the account's server answers, and the line switches once there have been two failures in a row and the first came back 10 s ago. A request that went unanswered for 10 s before failing counts as two. A blip that a retry gets through never shows.