[FIX] sql_db: typo in previous patch for autodetection of closed connections
My bad, I did and undid this patch several times in different manners and ended up commiting the wrong one. lp bug: https://launchpad.net/bugs/905257 fixed bzr revid: odo@openerp.com-20130215151237-3ks21kfhjb2fvl2z
This commit is contained in:
parent
39c8290b3b
commit
979c28d0c9
|
@ -405,7 +405,7 @@ class ConnectionPool(object):
|
|||
except psycopg2.OperationalError:
|
||||
self._debug('Cannot reset connection at index %d: %r', i, cnx.dsn)
|
||||
# psycopg2 2.4.4 and earlier do not allow closing a closed connection
|
||||
if cnx.closed:
|
||||
if not cnx.closed:
|
||||
cnx.close()
|
||||
|
||||
if cnx.closed:
|
||||
|
|
Loading…
Reference in New Issue