summaryrefslogtreecommitdiff
path: root/server/src/leap/soledad
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-10-19 16:27:43 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-10-19 16:27:43 -0300
commit0f8364b6a38793f9b0f8596c1b98a590131fbb41 (patch)
tree599313bb233b4ac565e0b43c570cf4ccc564b377 /server/src/leap/soledad
parent1b07d2b54208d6b19135e771162f7e39e02c1f97 (diff)
[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.
Diffstat (limited to 'server/src/leap/soledad')
-rw-r--r--server/src/leap/soledad/server/sync.py3
1 files changed, 0 insertions, 3 deletions
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)