diff options
Diffstat (limited to 'client/src/leap/soledad/client/http_target/api.py')
-rw-r--r-- | client/src/leap/soledad/client/http_target/api.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/leap/soledad/client/http_target/api.py b/client/src/leap/soledad/client/http_target/api.py index 2d51d94f..0e24b37f 100644 --- a/client/src/leap/soledad/client/http_target/api.py +++ b/client/src/leap/soledad/client/http_target/api.py @@ -40,9 +40,8 @@ class SyncTargetAPI(SyncTarget): Declares public methods and implements u1db.SyncTarget. """ - @defer.inlineCallbacks def close(self): - yield self._http.close() + return self._http.close() @property def uuid(self): @@ -75,6 +74,10 @@ class SyncTargetAPI(SyncTarget): if not body_producer: d = self._http.request(url, method, body, headers, body_reader) else: + # Upload case, check send.py + # Used to lazy produce body from docs with a custom protocol + # FIXME: _agent usage to bypass timeout, there is an ongoing + # discussion on how to properly do it. d = self._http._agent.request( method, url, headers=Headers(headers), bodyProducer=body_producer(body)) |