-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recognise that connection handling is a developer concern
Removes the logic to test for a connection error with Server Sent Events. My original attraction to SSE was that the browser would handle the connection and re-connect if it can. It turns out, after many years of using SSE(!), I learn that browsers are not consistent in their reconnection policy. For a start, browsers can decide how long to wait before re-connecting. SSE will re-connect automatically under certain conditions, but again there's no specification in terms of what these conditions should be. For example, an "503 - service unavailable" does not seem to cause a re-connect for Chrome, yet this is often a transient error. In the end, you're left with implementing your own connection handling anyway. We therefore push the testing of the connecting state back on the developer. I also clean up a couple of compiler/clippy warnings along the way, and fix the feature flag test for testing the net modules.
- Loading branch information
Showing
4 changed files
with
4 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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