From 26c74f91cb460b2cc26b5466aa8094792d42e07e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 24 Aug 2020 20:48:35 +0100 Subject: [PATCH] Ignore connection resets --- daemon.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon.py b/daemon.py index 26813f11..823e5465 100644 --- a/daemon.py +++ b/daemon.py @@ -8881,11 +8881,11 @@ class EpicyonServer(ThreadingHTTPServer): def handle_error(self, request, client_address): # surpress connection reset errors cls, e = sys.exc_info()[:2] - print('handle_error: ' + str(cls) + ", " + str(e)) - # if cls is socket.error or cls is ConnectionResetError: - # pass - # else: - return HTTPServer.handle_error(self, request, client_address) + if cls is socket.error or cls is ConnectionResetError: + print('ERROR: ' + str(cls) + ", " + str(e)) + pass + else: + return HTTPServer.handle_error(self, request, client_address) def runPostsQueue(baseDir: str, sendThreads: [], debug: bool) -> None: