Reply pong to ping messages#20
Closed
corentincam wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
My subscriber haven't lost the connection for more than 5 hours. The fix seems to work. |
Member
|
Thanks @corentincam I see that tungstenite says this in docs:
I've added a unit test at commit 967c5f3 and the stream automatically replies to pings. |
Contributor
Author
|
You're right, also my problem is still present with my patch so it doesn't seem to come from that... I don't understand why my subscriber disconnects after a few hours, I'll investigate more. This PR can be discarded |
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.
I've been using the subscribing part for some time now and I noticed that after a long period of time the subscribers silently lose the connection. I believe that's because the server is sending ping messages that are never replied with a pong (see this).
This little patch fixes that, I tested it and it works but I will know if the main issue of losing connection is fixed only in a few hours if I don't forget to test it.