[FIX] sql_db: close db connexions before removing them.
Closes #831 aka lp 1322191
This commit is contained in:
parent
9ed6accd2e
commit
8f30ab04be
|
@ -430,6 +430,8 @@ class ConnectionPool(object):
|
|||
for i, (cnx, used) in enumerate(self._connections):
|
||||
if not used:
|
||||
self._connections.pop(i)
|
||||
if not cnx.closed:
|
||||
cnx.close()
|
||||
self._debug('Removing old connection at index %d: %r', i, cnx.dsn)
|
||||
break
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue