Fixed ZPsycopgDA connection leak.

This commit is contained in:
Federico Di Gregorio 2005-11-17 09:51:01 +00:00
parent 985a6cbc1b
commit 1549c2611c
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-11-17 Federico Di Gregorio <fog@initd.org>
* ZPsycopgDA/pool.py: fixed connections leak by using the new name
(PersistentConnectionPool) for the old connection pool class.
2005-11-16 Federico Di Gregorio <fog@initd.org>
* Preparing release 2.0 beta 6.

View File

@ -31,7 +31,7 @@ def getpool(dsn, create=True):
try:
if not _connections_pool.has_key(dsn) and create:
_connections_pool[dsn] = \
psycopg2.pool.ThreadedConnectionPool(4, 200, dsn)
psycopg2.pool.PersistentConnectionPool(4, 200, dsn)
finally:
_connections_lock.release()
return _connections_pool[dsn]