From d8c87d7a9fba4fcf32d8c21eea705d28026c8b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Loipf=C3=BChrer?= <michael.loipfuehrer@stusta.de> Date: Wed, 4 Nov 2020 14:11:22 +0100 Subject: [PATCH] fix missing asyncio.gather --- hauptbahnhof/core/ws.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hauptbahnhof/core/ws.py b/hauptbahnhof/core/ws.py index a5810ce..80f0c68 100644 --- a/hauptbahnhof/core/ws.py +++ b/hauptbahnhof/core/ws.py @@ -85,7 +85,7 @@ class WebSocket: async def send_update(self, msg: Dict): encoded_msg = json.dumps(msg) - await asyncio.wait([conn.send(encoded_msg) for conn in self.connections]) + await asyncio.gather(*[conn.send(encoded_msg) for conn in self.connections]) def _refresh_cache(self): for token in list(self.cache.keys()): -- GitLab