-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Websocket response + disconnect race condition? #1260
Comments
I'm using TLS and it seems the problem is that the socket close triggers TlsTransport::stop(), which unregisters the incoming callback., thus eating the received message. |
Thank you for reporting, you are right, data can still be waiting for TLS decryption when TCP disconnect. Could you please try with #1266 ? |
@paullouisageneau Testing now, will report back in a few minutes |
Tested with #1266, fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm shipping video via WebRTC to a "server" with a unique websocket behavior:
Connect, send SDP, it immediately responds with an answer and then disconnects.
Most of the time, onClosed ends up getting called and onMessage never is. Wireshark shows that the answer was received. Digging into PollService::runLoop, it seems like this is caused by a race. If the close is executed before the runLoop comes back around, the message ends up dropped on the floor.
Am I reading the code correctly?
From onClose, is there any easy way to get the data? receive() gives me nothing.
Happy to dig in and solve this, but wanted to get some thoughts from others on the best approach and/or validation that I'm reading all of this correctly.
Thanks
The text was updated successfully, but these errors were encountered: