From 97d01a088c34dad50d3b6cbc3057291aa2aa2500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Tue, 2 Jun 2020 03:43:13 +0300 Subject: [PATCH] Don't log empty requests --- neomi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neomi.py b/neomi.py index f3c4ad4..8d8fb9a 100644 --- a/neomi.py +++ b/neomi.py @@ -751,7 +751,11 @@ class Serve(threading.Thread): try: self.handle_request() except BaseException as err: # Catch and log exceptions instead of letting to crash, as we need to update the worker thread count on abnormal exit as well - error('Worker thread (%s) died with: %s' % (self.address, err)) + if isinstance(err, EmptyRequestError): + # No real reason to log these, would get kinda spammy if we did due to mobile Chrome liking to cause these + pass + else: + error('Worker thread (%s) died with: %s' % (self.address, err)) finally: self.sock.close() self.controller.thread_end()