5 Commits

Author SHA1 Message Date
ef8df5cf4d bump to 1.7.0 2024-01-21 12:34:10 +00:00
1abca0c7e4 bump to 1.7.0b0 2024-01-09 15:37:33 +00:00
85180c1d94 upd variable name 2024-01-09 12:17:47 +00:00
f4db1ad95c fix prompt 2024-01-07 14:37:15 +00:00
efaee7594e should a socket operation be attempted after socket closed
then catch and log OSError and close thread.
2024-01-07 12:35:20 +00:00
3 changed files with 5 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ def main():
) as client:
client.callback.register([on_input_volume_meters, on_input_mute_state_changed])
while _ := input("<Enter> to exit>\n"):
while _ := input("Press <Enter> to exit\n"):
pass

View File

@@ -67,8 +67,8 @@ class EventClient:
"""
while not stop_event.is_set():
try:
if r := self.base_client.ws.recv():
event = json.loads(r)
if response := self.base_client.ws.recv():
event = json.loads(response)
self.logger.debug(f"Event received {event}")
type_, data = (
event["d"].get("eventType"),
@@ -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()

View File

@@ -1 +1 @@
version = "1.6.2"
version = "1.7.0"