websockets: don't alter dictionary during iteration of "view"
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
6c69dbdca9
commit
e93e4521a4
|
@ -178,7 +178,7 @@ class WebsocketManager:
|
||||||
'method': "notify_" + name,
|
'method': "notify_" + name,
|
||||||
'params': [data]})
|
'params': [data]})
|
||||||
async with self.ws_lock:
|
async with self.ws_lock:
|
||||||
for ws in self.websockets.values():
|
for ws in list(self.websockets.values()):
|
||||||
try:
|
try:
|
||||||
ws.write_message(notification)
|
ws.write_message(notification)
|
||||||
except WebSocketClosedError:
|
except WebSocketClosedError:
|
||||||
|
|
Loading…
Reference in New Issue