We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 801d144 commit b8b5020Copy full SHA for b8b5020
src/ansible_api/realtimemsg.py
@@ -37,7 +37,11 @@ async def send(data):
37
if group in RealTimeMessage.UserList:
38
for ws in RealTimeMessage.UserList.get(group, []):
39
if ws.open:
40
- await ws.send(json.dumps(msg))
+ try:
41
+ await ws.send(json.dumps(msg))
42
+ # FOR websockets.exceptions.ConnectionClosed: WebSocket connection is closed: code = 1006
43
+ except BaseException as e:
44
+ Tool.LOGGER.exception(e)
45
else:
46
# WSUser.UserList = [u for u in WSUser.UserList if u != x]
47
RealTimeMessage.UserList.get(group).remove(ws)
0 commit comments