mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Drop all connections from the connection manager when a server is dropped to avoid issues if sqlite reuses an ID. Fixes #1720
This commit is contained in:
committed by
Dave Page
parent
0ba414f0ab
commit
f117685d77
@@ -1721,6 +1721,17 @@ class Driver(BaseDriver):
|
||||
"""
|
||||
return self.connection_manager(sid).release(database, conn_id)
|
||||
|
||||
def delete_manager(self, sid):
|
||||
"""
|
||||
Delete manager for given server id.
|
||||
"""
|
||||
manager = self.connection_manager(sid)
|
||||
if manager is not None:
|
||||
manager.release()
|
||||
if session['_id'] in self.managers and \
|
||||
str(sid) in self.managers[session['_id']]:
|
||||
del self.managers[session['_id']][str(sid)]
|
||||
|
||||
def gc(self):
|
||||
"""
|
||||
Release the connections for the sessions, which have not pinged the
|
||||
|
||||
Reference in New Issue
Block a user