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:
Matthew Painter 2023-09-19 15:03:59 +01:00
parent 999d7a6d01
commit d3c60813ae

View File

@ -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: