mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-03 19:23:03 +03:00
Fixed ZPsycopgDA connection leak.
This commit is contained in:
parent
985a6cbc1b
commit
1549c2611c
|
@ -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>
|
2005-11-16 Federico Di Gregorio <fog@initd.org>
|
||||||
|
|
||||||
* Preparing release 2.0 beta 6.
|
* Preparing release 2.0 beta 6.
|
||||||
|
|
|
@ -31,7 +31,7 @@ def getpool(dsn, create=True):
|
||||||
try:
|
try:
|
||||||
if not _connections_pool.has_key(dsn) and create:
|
if not _connections_pool.has_key(dsn) and create:
|
||||||
_connections_pool[dsn] = \
|
_connections_pool[dsn] = \
|
||||||
psycopg2.pool.ThreadedConnectionPool(4, 200, dsn)
|
psycopg2.pool.PersistentConnectionPool(4, 200, dsn)
|
||||||
finally:
|
finally:
|
||||||
_connections_lock.release()
|
_connections_lock.release()
|
||||||
return _connections_pool[dsn]
|
return _connections_pool[dsn]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user