From 7be440feff6776487196868f91b005e27f66b93d Mon Sep 17 00:00:00 2001 From: blueblue Date: Fri, 27 Dec 2019 13:56:15 +0800 Subject: [PATCH] fix redundant GremlinServers when sending requests concurrently --- aiogremlin/driver/cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiogremlin/driver/cluster.py b/aiogremlin/driver/cluster.py index 9895cda..5f2aebc 100644 --- a/aiogremlin/driver/cluster.py +++ b/aiogremlin/driver/cluster.py @@ -117,8 +117,8 @@ async def get_connection(self, hostname=None): 'Unknown host: {}'.format(hostname)) else: host = self._hosts.popleft() - conn = await host.get_connection() self._hosts.append(host) + conn = await host.get_connection() return conn async def establish_hosts(self):