diff --git a/goblin/driver/cluster.py b/goblin/driver/cluster.py index f7952d7198ac6f1ee193a1c827ca322ba57625bb..0cab8962f7f7c5ac671291a7a7d93945b62bdc59 100644 --- a/goblin/driver/cluster.py +++ b/goblin/driver/cluster.py @@ -194,5 +194,5 @@ class Cluster: while self._hosts: host = self._hosts.popleft() waiters.append(host.close()) - await asyncio.gather(*waiters) + await asyncio.gather(*waiters, loop=self._loop) self._closed = True diff --git a/goblin/driver/pool.py b/goblin/driver/pool.py index 3df37dedf0ee5a3194ae2986989eed3db11b445c..8b231ae859925c39e81022160e23e00c366f9f6f 100644 --- a/goblin/driver/pool.py +++ b/goblin/driver/pool.py @@ -211,7 +211,7 @@ class ConnectionPool: while self._acquired: conn = self._acquired.popleft() waiters.append(conn.close()) - await asyncio.gather(*waiters) + await asyncio.gather(*waiters, loop=self._loop) async def _get_connection(self, username, password, max_inflight, response_timeout, message_serializer):