diff --git a/mariadb/connectionpool.py b/mariadb/connectionpool.py index 882ff69..b17c984 100644 --- a/mariadb/connectionpool.py +++ b/mariadb/connectionpool.py @@ -218,7 +218,8 @@ class ConnectionPool(object): conn._used += 1 self._connections_used.append(conn) - del self._connections_free[i] + x = self._connections_free.index(conn) + del self._connections_free[x] return conn return None