Skip to content

Commit

Permalink
let's exception not bubble
Browse files Browse the repository at this point in the history
ensure we can catch  correctly  exceptions based on BaseException.

Note: patch was origninally proposed by the pr benoitc#2923, but original
author closed it.

Fix benoitc#2923
  • Loading branch information
benoitc committed Dec 7, 2023
1 parent ca9162d commit 4023228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gunicorn/workers/base_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion gunicorn/workers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4023228

Please sign in to comment.