From d7669413af1e4c4b6c0dbafe5b4c79e1e96f92ee Mon Sep 17 00:00:00 2001 From: shortcutme Date: Sat, 26 Oct 2019 20:17:09 +0200 Subject: [PATCH] Log ConnectionAbortedError as warning --- src/Ui/UiServer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Ui/UiServer.py b/src/Ui/UiServer.py index d2c40f17..263bb630 100644 --- a/src/Ui/UiServer.py +++ b/src/Ui/UiServer.py @@ -51,12 +51,16 @@ class UiWSGIHandler(WSGIHandler): ws_handler = WebSocketHandler(*self.args, **self.kwargs) ws_handler.__dict__ = self.__dict__ # Match class variables ws_handler.run_application() + except ConnectionAbortedError as err: + logging.warning("UiWSGIHandler websocket connection aborted: %s" % err) except Exception as err: logging.error("UiWSGIHandler websocket error: %s" % Debug.formatException(err)) self.handleError(err) else: # Standard HTTP request try: super(UiWSGIHandler, self).run_application() + except ConnectionAbortedError as err: + logging.warning("UiWSGIHandler connection aborted: %s" % err) except Exception as err: logging.error("UiWSGIHandler error: %s" % Debug.formatException(err)) self.handleError(err)