From efaee7594e06d6dae1eb77994f373277ccd621a4 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 7 Jan 2024 12:35:20 +0000 Subject: [PATCH] should a socket operation be attempted after socket closed then catch and log OSError and close thread. --- obsws_python/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obsws_python/events.py b/obsws_python/events.py index 9289d5f..a69b3de 100644 --- a/obsws_python/events.py +++ b/obsws_python/events.py @@ -78,7 +78,7 @@ class EventClient: except WebSocketTimeoutException as e: self.logger.exception(f"{type(e).__name__}: {e}") raise OBSSDKTimeoutError("Timeout while waiting for event") from e - except WebSocketConnectionClosedException as e: + except (WebSocketConnectionClosedException, OSError) as e: self.logger.debug(f"{type(e).__name__} terminating the event thread") stop_event.set()