From 0f8364b6a38793f9b0f8596c1b98a590131fbb41 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 19 Oct 2015 16:27:43 -0300 Subject: [bug] remove instance caching couchdb library relies on garbage collector to close remaining connections. Somehow, caching the instance is avoiding gc to call __del__ on underlying couchdb sessions. --- server/src/leap/soledad/server/sync.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'server') diff --git a/server/src/leap/soledad/server/sync.py b/server/src/leap/soledad/server/sync.py index b3fb2b84..92b29102 100644 --- a/server/src/leap/soledad/server/sync.py +++ b/server/src/leap/soledad/server/sync.py @@ -188,12 +188,9 @@ class SyncResource(http_app.SyncResource): cache = get_cache_for('db-' + sync_id + self.dbname, expire=120) if ensure: db, self.replica_uid = self.state.ensure_database(self.dbname) - elif cache and 'instance' in cache: - db = cache['instance'] else: db = self.state.open_database(self.dbname) db.init_caching(cache) - cache['instance'] = db # validate the information the client has about server replica db.validate_gen_and_trans_id( last_known_generation, last_known_trans_id) -- cgit v1.2.3