From 234e5879188fe100bf99b9ef6f252abff06b4dad Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 2 Oct 2015 12:03:29 -0400 Subject: [bug] do not signal sync completion if failed - Related: #7503 --- client/changes/bug_7503-do-not-signal-sync-complete | 1 + client/src/leap/soledad/client/api.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 client/changes/bug_7503-do-not-signal-sync-complete (limited to 'client') diff --git a/client/changes/bug_7503-do-not-signal-sync-complete b/client/changes/bug_7503-do-not-signal-sync-complete new file mode 100644 index 00000000..4cc361e0 --- /dev/null +++ b/client/changes/bug_7503-do-not-signal-sync-complete @@ -0,0 +1 @@ +o Do not signal sync completion if sync failed. Closes: #7503 diff --git a/client/src/leap/soledad/client/api.py b/client/src/leap/soledad/client/api.py index a558addd..8c5f7f1b 100644 --- a/client/src/leap/soledad/client/api.py +++ b/client/src/leap/soledad/client/api.py @@ -723,7 +723,7 @@ class Soledad(object): return passthrough d.addCallbacks(_sync_callback, _sync_errback) - d.addBoth(_emit_done_data_sync) + d.addCallback(_emit_done_data_sync) return d @property -- cgit v1.2.3 From 2121d21945ef7458eb57c3cab53a98b92fce1417 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 2 Oct 2015 11:54:54 -0400 Subject: [bug] increase http request timeout time to 90s this is a workaroud to reduce the chances of failed sync due to timeouts. this should be properly tackled by: 1. implementing proper cancellable for the sync operation. 2. implementing a retry count at the level of a single request, handled internally by soledad. in this way we can remove the retries logic from the soledadbootstrapper in the bitmask client. - Related: #7382 --- client/src/leap/soledad/client/http_target/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/src/leap/soledad/client/http_target/__init__.py b/client/src/leap/soledad/client/http_target/__init__.py index 7a5cea9f..498fb6e7 100644 --- a/client/src/leap/soledad/client/http_target/__init__.py +++ b/client/src/leap/soledad/client/http_target/__init__.py @@ -87,4 +87,8 @@ class SoledadHTTPSyncTarget(SyncTargetAPI, HTTPDocSender, HTTPDocFetcher): # asynchronous encryption/decryption attributes self._decryption_callback = None self._sync_decr_pool = None - self._http = HTTPClient(cert_file) + + # XXX Increasing timeout of simple requests to avoid chances of hitting + # the duplicated syncing bug. This could be reduced to the 30s default + # after implementing Cancellable Sync. See #7382 + self._http = HTTPClient(cert_file, timeout=90) -- cgit v1.2.3