diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/leap/soledad/client/sqlcipher.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/leap/soledad/client/sqlcipher.py b/client/src/leap/soledad/client/sqlcipher.py index b7de2fba..26e74ef5 100644 --- a/client/src/leap/soledad/client/sqlcipher.py +++ b/client/src/leap/soledad/client/sqlcipher.py @@ -52,6 +52,7 @@ import json from hashlib import sha256 from contextlib import contextmanager from collections import defaultdict +from httplib import CannotSendRequest from pysqlcipher import dbapi2 from u1db.backends import sqlite_backend @@ -486,6 +487,11 @@ class SQLCipherDatabase(sqlite_backend.SQLitePartialExpandDatabase): except PendingReceivedDocsSyncError: logger.warning("Local sync db is not clear, skipping sync...") return + except CannotSendRequest: + logger.warning("Connection with sync target couldn't be established. Resetting connection...") + # closing the connection it will get it recreated in the next try + syncer.sync_target.close() + return return res |