Don't log empty requests
This commit is contained in:
parent
0a8e10db90
commit
97d01a088c
1 changed files with 5 additions and 1 deletions
6
neomi.py
6
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()
|
||||
|
|
Loading…
Reference in a new issue