Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail the WebSocket connection on protocol error
This is correct according to the spec for invalid UTF-8 errors. The spec isn't clear for other errors (e.g. receiving a message which is too large), but failing the connection seems appropriate. Specifically this means that we send the close code and then _close the tcp connection_. Previously there was a bug where the input stream would not be processed and therefore a close handshake ack would not be processed, leaving the connection open. Also refactored this logic into handler
- Loading branch information
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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