1
0
Fork 0

Fix: Unable to drop previously connected-to database (#1152)

* close connections + added to authors + changelog

* check conn exists
This commit is contained in:
g.denis 2020-03-12 21:45:59 +01:00 committed by GitHub
parent bc7a5d0100
commit 0f3d4602ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -105,6 +105,7 @@ Contributors:
* BrownShibaDog
* George Thomas(thegeorgeous)
* Yoni Nakache(lazydba247)
* Gantsev Denis
Creator:
--------

View File

@ -11,6 +11,7 @@ Features:
Bug fixes:
* Fix warning raised for using `is not` to compare string literal
* Close open connection in completion_refresher thread
Internal:
---------

View File

@ -84,6 +84,10 @@ class CompletionRefresher(object):
for callback in callbacks:
callback(completer)
if not settings.get("single_connection") and executor.conn:
# close connection established with pgexecute.copy()
executor.conn.close()
def refresher(name, refreshers=CompletionRefresher.refreshers):
"""Decorator to populate the dictionary of refreshers with the current