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:
Harshal Dhumal
2016-09-22 12:57:52 +01:00
committed by Dave Page
parent 0ba414f0ab
commit f117685d77
2 changed files with 13 additions and 16 deletions

View File

@@ -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