mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
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
This commit is contained in:
parent
ca9162d9cd
commit
4023228493
@ -82,7 +82,7 @@ class AsyncWorker(base.Worker):
|
|||||||
self.log.debug("Ignoring socket not connected")
|
self.log.debug("Ignoring socket not connected")
|
||||||
else:
|
else:
|
||||||
self.log.debug("Ignoring EPIPE")
|
self.log.debug("Ignoring EPIPE")
|
||||||
except Exception as e:
|
except BaseException as e:
|
||||||
self.handle_error(req, client, addr, e)
|
self.handle_error(req, client, addr, e)
|
||||||
finally:
|
finally:
|
||||||
util.close(client)
|
util.close(client)
|
||||||
|
|||||||
@ -154,7 +154,7 @@ class SyncWorker(base.Worker):
|
|||||||
self.log.debug("Ignoring socket not connected")
|
self.log.debug("Ignoring socket not connected")
|
||||||
else:
|
else:
|
||||||
self.log.debug("Ignoring EPIPE")
|
self.log.debug("Ignoring EPIPE")
|
||||||
except Exception as e:
|
except BaseException as e:
|
||||||
self.handle_error(req, client, addr, e)
|
self.handle_error(req, client, addr, e)
|
||||||
finally:
|
finally:
|
||||||
util.close(client)
|
util.close(client)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user