mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2026-04-19 14:33:31 +00:00
Compare commits
5 Commits
2cebd5eedb
...
fix-discon
| Author | SHA1 | Date | |
|---|---|---|---|
| ef8df5cf4d | |||
| 1abca0c7e4 | |||
| 85180c1d94 | |||
| f4db1ad95c | |||
| efaee7594e |
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
version = "1.6.2"
|
||||
version = "1.7.0"
|
||||
|
||||
Reference in New Issue
Block a user