Skip to content

Commit 3a56229

Browse files
committed
Merge branch 'master' of github.com:snower/TorMySQL
2 parents fc73d8a + 7275733 commit 3a56229

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tormysql/pool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def release_connection(self, connection):
138138
connection.used_time = time.time()
139139
if connection.open:
140140
wait_future = self._wait_connections.popleft()
141-
wait_future.set_result(connection)
141+
IOLoop.current().add_callback(wait_future.set_result, connection)
142142
else:
143143
try:
144144
del self._used_connections[id(connection)]
@@ -217,4 +217,4 @@ def check_idle_connections(self):
217217
if not self._closed and self._connections or self._used_connections:
218218
IOLoop.current().add_timeout(next_check_time, self.check_idle_connections)
219219
else:
220-
self._check_idle_callback = False
220+
self._check_idle_callback = False

0 commit comments

Comments
 (0)