Skip to content

Commit

Permalink
Re-add the random jitter in case time.time() returns identical values.
Browse files Browse the repository at this point in the history
Fixes #2901
  • Loading branch information
coleifer committed May 22, 2024
1 parent c6f4c4d commit 8182d2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playhouse/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _connect(self):
len(self._in_use) >= self._max_connections):
raise MaxConnectionsExceeded('Exceeded maximum connections.')
conn = super(PooledDatabase, self)._connect()
ts = time.time()
ts = time.time() - random.random() / 1000
key = self.conn_key(conn)
logger.debug('Created new connection %s.', key)

Expand Down

0 comments on commit 8182d2a

Please sign in to comment.