Skip to content

Commit 5a61845

Browse files
committed
Fix for CONPY-161:
Since resolution of time.monotonic() is not precise enough, we need to use first connection in ConnectionPool.get_connection() method, in case all values obtained by time.monotonic() are the same.
1 parent 9d472c2 commit 5a61845

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mariadb/connectionpool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def get_connection(self):
157157

158158
now= time.monotonic()
159159
conn= None
160-
timediff= 0
160+
timediff= -1
161161

162162
with self._lock_pool:
163163
for i in range(0, len(self._connections)):

0 commit comments

Comments
 (0)