From 86d85cb3699c41a2c958c604344b62022e5a4c38 Mon Sep 17 00:00:00 2001 From: benoitc Date: Tue, 18 Jul 2023 14:10:36 +0200 Subject: [PATCH] fix gthread worker under Python 3.8 and sup exception is ValueError when fd has already been cleared by the system. fix #3029 --- gunicorn/workers/gthread.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gunicorn/workers/gthread.py b/gunicorn/workers/gthread.py index fb37fd3f3..dbbb7c3ae 100644 --- a/gunicorn/workers/gthread.py +++ b/gunicorn/workers/gthread.py @@ -180,6 +180,9 @@ def murder_keepalived(self): except KeyError: # already removed by the system, continue pass + except ValueError: + # already removed by the system continue + pass # close the socket conn.close()