INNER CODE UNIT · Python
_cleanup
FLOCK4H/Dexter · Dexter.py:429
def _cleanup(_):
self.active_tasks.discard(task)
task.add_done_callback(_cleanup)
def _is_expected_shutdown_error(self, exc: BaseException) -> bool:
if not (self.is_closing or self.stop_event.is_set()):
return False
if isinstance(
exc,
(
ClientConnectionError,
ConnectionError,
TimeoutError,
websockets.ConnectionClosed,
),
):
return True
message = str(exc).lower()