should a socket operation be attempted after socket closed

then catch and log OSError and close thread.
This commit is contained in:
onyx-and-iris 2024-01-07 12:35:20 +00:00
parent 2cebd5eedb
commit efaee7594e

View File

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