[event] fix bugs

This commit is contained in:
IrvingGao 2024-06-18 22:27:39 +08:00
parent 4044e2b3e6
commit fd78acf698
1 changed files with 3 additions and 1 deletions

View File

@ -376,6 +376,8 @@ class WebSocketClinet:
)
except BrokenPipeError:
print(f"{datetime.now()}: web socket connection broken, skip send data.")
self.listening_event.set()
self.speaking_event.clear()
client.close_client()
break
# is_end后切换播放模式
@ -386,7 +388,7 @@ class WebSocketClinet:
if not self.wakeup_event.is_set():
continue
if self.listening_event.is_set() or self.speaking_event.is_set():
if self.listening_event.is_set():
print(f"{datetime.now()}: listening or speaking, skip setup web socket connection.")
continue