summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad/client/http_target/api.py
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-09-14 15:33:01 -0300
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-09-16 10:00:45 +0200
commit98f99d1106a8941b701acda78095c3e4d1cd5f9e (patch)
treeb5a03d029fd3544dfc52565a804b83a693922aca /client/src/leap/soledad/client/http_target/api.py
parente5e572bee81bec4bc60f4a538269f9cf5061965a (diff)
[bug] review some of the close methods
We are getting "too many files open" while running tests with 1024 max files open. This is a leak from close methods. Some of them should be fixed on this commit, but further investigation may be necessary.
Diffstat (limited to 'client/src/leap/soledad/client/http_target/api.py')
-rw-r--r--client/src/leap/soledad/client/http_target/api.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/leap/soledad/client/http_target/api.py b/client/src/leap/soledad/client/http_target/api.py
index dc13e9cc..dcc762f6 100644
--- a/client/src/leap/soledad/client/http_target/api.py
+++ b/client/src/leap/soledad/client/http_target/api.py
@@ -32,8 +32,13 @@ class SyncTargetAPI(SyncTarget):
Declares public methods and implements u1db.SyncTarget.
"""
+ @defer.inlineCallbacks
def close(self):
- self._http.close()
+ if self._sync_enc_pool:
+ self._sync_enc_pool.stop()
+ if self._sync_decr_pool:
+ self._sync_decr_pool.stop()
+ yield self._http.close()
def set_creds(self, creds):
"""