Skip to content

Commit abeb6c2

Browse files
committed
fix bug of get_random_connection reported by myrfy001
1 parent d84a5ad commit abeb6c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

aredis/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def get_random_connection(self):
411411
Open new connection to random redis server.
412412
"""
413413
if self._available_connections:
414-
node_name = random.choice(self._available_connections)
414+
node_name = random.choice(list(self._available_connections.keys()))
415415
conn_list = self._available_connections[node_name]
416416
# check it in case of empty connection list
417417
if conn_list:

0 commit comments

Comments
 (0)