mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-29 01:19:45 +03:00
AbstractConnectionPool does not pool more than "minconn" connections.
The pool should add the connection back into the pool as long as the pool is not larger than the maximum pool size.
This commit is contained in:
parent
999d7a6d01
commit
d3c60813ae
|
@ -102,7 +102,7 @@ class AbstractConnectionPool:
|
|||
if key is None:
|
||||
raise PoolError("trying to put unkeyed connection")
|
||||
|
||||
if len(self._pool) < self.minconn and not close:
|
||||
if len(self._pool) < self.maxconn and not close:
|
||||
# Return the connection into a consistent state before putting
|
||||
# it back into the pool
|
||||
if not conn.closed:
|
||||
|
|
Loading…
Reference in New Issue
Block a user