Fixes "Task was destroyed but it is pending"

* asyncio.gather expects *tasks .. gotta unpack the list
This commit is contained in:
Chris Meyers 2024-02-14 10:34:25 -05:00 committed by Hao Liu
parent b6f9b73418
commit 2109b5039e

View File

@ -339,7 +339,7 @@ class WebSocketRelayManager(object):
if deleted_remote_hosts:
logger.info(f"Removing {deleted_remote_hosts} from websocket broadcast list")
await asyncio.gather(self.cleanup_offline_host(h) for h in deleted_remote_hosts)
await asyncio.gather(*[self.cleanup_offline_host(h) for h in deleted_remote_hosts])
if new_remote_hosts:
logger.info(f"Adding {new_remote_hosts} to websocket broadcast list")