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

rpcserver: Detect disconnect of ws clients. #3031

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Nov 30, 2022

The recent commit that converted the websocket handler to use contexts in PR #3026 failed to account for the request context not being closed when the connection is closed unlike the case in the HTTP path since the websocket hijacks the connection.

This ensures the Run method terminates on websocket disconnection by selecting across both the context and the quit channel that is closed when disconnect is called.

The recent commit that converted the websocket handler to use contexts
failed to account for the request context not being closed when the
connection is closed unlike the case in the HTTP path since the
websocket hijacks the connection.

This ensures the Run method terminates on websocket disconnection by
selecting across both the context and the quit channel that is closed
when disconnect is called.
@davecgh davecgh added this to the 1.8.0 milestone Nov 30, 2022
@davecgh davecgh merged commit bb14350 into decred:master Nov 30, 2022
@davecgh davecgh deleted the rpcserver_detect_ws_disconnect branch November 30, 2022 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants