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:
benoitc 2023-12-07 15:36:28 +01:00
parent ca9162d9cd
commit 4023228493
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)