Fix dropping of databases over SSH tunneled connections. Fixes #3357

This commit is contained in:
Akshay Joshi 2018-05-28 17:37:24 -04:00 committed by Dave Page
parent 08990cb1de
commit 17977d5d0e

View File

@ -273,8 +273,10 @@ WHERE db.oid = {0}""".format(did))
self.connections.pop(conn_info['conn_id'])
def release(self, database=None, conn_id=None, did=None):
# Stop the SSH tunnel if created.
self.stop_ssh_tunnel()
# Stop the SSH tunnel if release() function calls without
# any parameter.
if database is None and conn_id is None and did is None:
self.stop_ssh_tunnel()
if did is not None:
if did in self.db_info and 'datname' in self.db_info[did]: