Fix connection garbage collector. Fixes #3700

This commit is contained in:
Harshal Dhumal 2018-10-17 12:35:45 +01:00 committed by Dave Page
parent 494a8ac3fe
commit ce31726af5
2 changed files with 3 additions and 2 deletions

View File

@ -20,3 +20,4 @@ Bug fixes
| `Bug #3638 <https://redmine.postgresql.org/issues/3638>`_ - Fix syntax error when creating new pgAgent schedules with a start date/time and exception.
| `Bug #3674 <https://redmine.postgresql.org/issues/3674>`_ - Cleanup session files periodically.
| `Bug #3660 <https://redmine.postgresql.org/issues/3660>`_ - Rename the 'SQL Editor' section of the Preferences to 'Query Tool' as it applies to the whole tool, not just the editor.
| `Bug #3700 <https://redmine.postgresql.org/issues/3700>`_ - Fix connection garbage collector.

View File

@ -200,10 +200,10 @@ class Driver(BaseDriver):
if sess == session.sid:
sess_mgr['pinged'] = curr_time
continue
if curr_time - sess_mgr['pinged'] >= session_idle_timeout:
for mgr in [
m for m in sess_mgr if isinstance(m, ServerManager)
m for m in sess_mgr.values() if isinstance(m,
ServerManager)
]:
mgr.release()