daemon: Fix removal while iterating over connections set (#14887)

This commit is contained in:
dustinface 2023-03-25 12:28:25 +07:00 committed by GitHub
parent b8e5aebf54
commit 3e76f78e37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,7 +279,7 @@ class WebSocketServer:
return ws
async def send_all_responses(self, connections: Set[WebSocketResponse], response: str) -> None:
for connection in connections:
for connection in connections.copy():
try:
await connection.send_str(response)
except Exception as e: