-
Notifications
You must be signed in to change notification settings - Fork 10
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
The client connection should be aborted on write errors #22
Labels
Comments
Here's a case of something like this happening. Looks like for the case of
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Kontena::Websocket::Client::Connection#write
method will do multiple partial write calls to write out the complete websocket frame. If any of those partial write calls fail, then we might end up with a partial websocket frame written out on the socket, which would corrupt any further writes. For safety, even a non-partial write failure for a websocket frame should be considered a corrupted connection.Currently any exceptions raised from
#write
do not explicitly mark the connection as dead. If they happen to be handshake/ping/pong frames written by the#read
thread, then they will propagate out and break the read loop. However, if the writes come from other threads doing separate#send
calls, then they will not abort the#read
thread, or prevent any further#send
calls, which can result in corrupted connection.The text was updated successfully, but these errors were encountered: