diff options
| author | Cedric Le Brouster <cedric.lebrouster@kerbois.com> | 2014-06-30 13:48:52 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2014-12-21 19:50:56 +0100 |
| commit | 8f30ab04befc11f9705fbfe1579b0cfc40aac3d7 (patch) | |
| tree | 9ae59f492d98e5ac5938b5d1ad953edca4f967a3 /openerp/sql_db.py | |
| parent | 9ed6accd2e8fca404018b2f998d0c913453e101b (diff) | |
[FIX] sql_db: close db connexions before removing them.
Closes #831 aka lp 1322191
Diffstat (limited to 'openerp/sql_db.py')
| -rw-r--r-- | openerp/sql_db.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openerp/sql_db.py b/openerp/sql_db.py index 1c57b729569..39c87049fb0 100644 --- a/openerp/sql_db.py +++ b/openerp/sql_db.py @@ -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: |
