diff --git a/gunicorn/workers/gthread.py b/gunicorn/workers/gthread.py index 7327a318..fcdcc7a7 100644 --- a/gunicorn/workers/gthread.py +++ b/gunicorn/workers/gthread.py @@ -179,6 +179,9 @@ class ThreadWorker(base.Worker): except EnvironmentError as e: if e.errno != errno.EBADF: raise + except KeyError: + # already removed by the system, continue + pass # close the socket conn.close()