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

Notify web socket readers when socket is closed becaus no pong received. #49

Closed
wants to merge 8 commits into from

Conversation

Alexibu
Copy link
Contributor

@Alexibu Alexibu commented Dec 13, 2024

When a web socket client disappears with out closing the socket nicely, the ping / pong mechanism is designed to detect this. It does detect it and closes the socket, but if there are readers waiting for messages they receive no notification and stay reading.
This change notifies the readers, so they get a socket closed exception.
Close already stops the timer so the call to stop the timer was redundant.

@s-ludwig
Copy link
Member

Good catch, I remember sometimes seeing a kind of memory leak when web sockets were involved. Can you cherry pick your last commit into a new branch and use that for the PR, though? It has picked up the previous cookie changes, too.

@Alexibu Alexibu closed this by deleting the head repository Dec 13, 2024
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.

2 participants