forked from Xenomega/EchoRelay
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance WebSocket exception handling and logging
This change enhances the robustness of the WebSocket handling by ensuring that exceptions are properly logged and do not cause the service to crash. - Exceptions/Faults Task.Run which handles a websocket connection are now caught and logged. The connection is closed with an internal server error status. - Service exceptions are caught and logged. The connection is closed with an internal server error status. - Exception logging added to empty catch blocks. - Exceptions thrown while handling a websocket connection now result in the connection being closed with an internal server error status. - The following exceptions are now logged (or improved): - HTTP Listener failures. - Unauthorized (by ACL) connections. - Non-websocket requests. - Connection timeouts. - Connection acceptance errors. - Invalid websocket paths. - Exceptions thrown while starting the server. - Exceptions thrown while stopping the server.
- Loading branch information
1 parent
3dfe70e
commit ff0f881
Showing
3 changed files
with
52 additions
and
13 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
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