From 4de7835d32d989a90fb1a3ed1e8f868f764f7764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Thu, 3 Mar 2016 17:47:04 +0100 Subject: [PATCH] Use the copy we made for this thread, otherwise not thread safe Fixes #371 --- elasticsearch/connection_pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/connection_pool.py b/elasticsearch/connection_pool.py index 346a884a..c1e90cc9 100644 --- a/elasticsearch/connection_pool.py +++ b/elasticsearch/connection_pool.py @@ -222,7 +222,7 @@ class ConnectionPool(object): # only call selector if we have a selection if len(connections) > 1: - return self.selector.select(self.connections) + return self.selector.select(connections) # only one connection, no need for a selector return connections[0]