-
Notifications
You must be signed in to change notification settings - Fork 297
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
Ping sometimes causes Close to time out #298
Comments
Hi @univerio So I'm not 100% sure but I believe this is expected behaviour as the Ping being every 10 milliseconds is effectively hogging the write lock. Instead of a ticker, try using a timer that is reset after every ping/pong. I'd bet it happens far less often if never as there would be a guaranteed 10ms interval between pings/pongs then. I'll be sure to test prior to the next release myself. And apologies for the delayed response! |
I made it 10ms to make it fail faster, but it happens with 1s tick and 3s closure delay as well. This stops happening if you take out a mutex around However, you're right that it does happen less often when using a |
Ah yea if that's the case then this does sound like a bug. Can you try the |
Sorry for the late response here. I tested the |
Will add as a test case to the dev branch so if it happens again I'll investigate. |
Is this fixed? Will there be a new version besides having this in dev branch? |
Hi ! First, I want to say thanks for this library which comes quite handy 😄 The client is somehow blocked in the I managed to get 100% reproduction with this "quite simple" test:
Which outputs:
Reproduction steps:
I'm not quite sure if this is an issue with the library or the way I use them. But this is definetly confusing and it would add complexity to implement around this obscure behaviour. |
I found a simple fix for this but it does not compply with the RFC (section-5.5.1) which specify:
Therefore I can assume that I created a PR to fix this issue: #394 |
Closes #298 Closes #394 The close frame was being received from the peer before we were able to reset our write timeout and so we thought the write kept failing but it never was... Thanks @univerio and @bhallionOhbibi
Fixed in dev, see 28c6709 Thanks again @univerio and @bhallionOhbibi |
Minimal reproduction:
This seems to non-deterministically fail with the documented 5s timeout:
Is it incorrect to call
Close()
concurrently withPing()
?The text was updated successfully, but these errors were encountered: