From d3c60813ae6dc8e54d9bf0ed16c1e6216ec61ce0 Mon Sep 17 00:00:00 2001 From: Matthew Painter Date: Tue, 19 Sep 2023 15:03:59 +0100 Subject: [PATCH] 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. --- lib/pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pool.py b/lib/pool.py index 9d67d68e..d5a03a70 100644 --- a/lib/pool.py +++ b/lib/pool.py @@ -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: