mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
server: fix websocket
This commit is contained in:
@@ -211,8 +211,11 @@ class WebsocketManager:
|
|||||||
async def send_json(self, transcript_id: UUID, message):
|
async def send_json(self, transcript_id: UUID, message):
|
||||||
if transcript_id not in self.active_connections:
|
if transcript_id not in self.active_connections:
|
||||||
return
|
return
|
||||||
for connection in self.active_connections[transcript_id]:
|
for connection in self.active_connections[transcript_id][:]:
|
||||||
await connection.send_json(message)
|
try:
|
||||||
|
await connection.send_json(message)
|
||||||
|
except Exception:
|
||||||
|
self.active_connections[transcript_id].remove(connection)
|
||||||
|
|
||||||
|
|
||||||
ws_manager = WebsocketManager()
|
ws_manager = WebsocketManager()
|
||||||
|
|||||||
Reference in New Issue
Block a user