diff --git a/gunicorn/workers/base_async.py b/gunicorn/workers/base_async.py index b059a7cb5..6a79d7ed0 100644 --- a/gunicorn/workers/base_async.py +++ b/gunicorn/workers/base_async.py @@ -82,7 +82,7 @@ def handle(self, listener, client, addr): self.log.debug("Ignoring socket not connected") else: self.log.debug("Ignoring EPIPE") - except Exception as e: + except BaseException as e: self.handle_error(req, client, addr, e) finally: util.close(client) diff --git a/gunicorn/workers/sync.py b/gunicorn/workers/sync.py index 39a209f06..ddcd77270 100644 --- a/gunicorn/workers/sync.py +++ b/gunicorn/workers/sync.py @@ -154,7 +154,7 @@ def handle(self, listener, client, addr): self.log.debug("Ignoring socket not connected") else: self.log.debug("Ignoring EPIPE") - except Exception as e: + except BaseException as e: self.handle_error(req, client, addr, e) finally: util.close(client)