Skip to content

Commit 4023228

Browse files
committed
let's exception not bubble
ensure we can catch correctly exceptions based on BaseException. Note: patch was origninally proposed by the pr #2923, but original author closed it. Fix #2923
1 parent ca9162d commit 4023228

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: gunicorn/workers/base_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def handle(self, listener, client, addr):
8282
self.log.debug("Ignoring socket not connected")
8383
else:
8484
self.log.debug("Ignoring EPIPE")
85-
except Exception as e:
85+
except BaseException as e:
8686
self.handle_error(req, client, addr, e)
8787
finally:
8888
util.close(client)

Diff for: gunicorn/workers/sync.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def handle(self, listener, client, addr):
154154
self.log.debug("Ignoring socket not connected")
155155
else:
156156
self.log.debug("Ignoring EPIPE")
157-
except Exception as e:
157+
except BaseException as e:
158158
self.handle_error(req, client, addr, e)
159159
finally:
160160
util.close(client)

0 commit comments

Comments
 (0)