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

Proper error handling for connection interruption #29

Open
minghuaw opened this issue Oct 25, 2021 · 1 comment
Open

Proper error handling for connection interruption #29

minghuaw opened this issue Oct 25, 2021 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@minghuaw
Copy link
Owner

#27

@minghuaw minghuaw self-assigned this Oct 25, 2021
@minghuaw minghuaw added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Oct 25, 2021
@minghuaw
Copy link
Owner Author

Because each HTTP framework has its own wrapper for WebSocket errors, all WebSocket errors that causes failure to write a message will be treated as an IoError(_). An IoError(_) will cause the writer loop to stop which should then drop the connection (at least the write half of the connection), and further messages sent to the writer loop will encounter an error, which will be used to indicate an underlying connection problem (at least on the writer half). The broker could then pass this error to Call which could then relay the information to the user to decide whether to reconnect.

The error propagation chain is unnecessarily long, and this is due to a bad design decision for separating broker-reader-writer as if they are separate actors. A new design where broker is able to easily detect connection problem (at least with the write side) should be implemented in 0.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant