From 61ea05a612137b442c857064c61b73391ae73691 Mon Sep 17 00:00:00 2001 From: Konstantinos Panayiotou Date: Thu, 19 Dec 2024 18:09:15 +0200 Subject: [PATCH] Catch exceptions from async shutdown --- commlib/endpoints.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commlib/endpoints.py b/commlib/endpoints.py index 03e7724..bb2f027 100644 --- a/commlib/endpoints.py +++ b/commlib/endpoints.py @@ -118,7 +118,10 @@ def stop(self) -> None: f"Transport is not connected - cannot stop {self.__class__.__name__}") def __del__(self): - self.stop() + try: + self.stop() + except: + pass class EndpointType(Enum):