Reset connection with u1db in case it closes

Refer to https://leap.se/code/issues/5855

Resetting the sync_target._conn will result on u1db’s HTTPClientBase._ensure_connection() to recreate the connection the next time it tries to use it.
Sure i'll try that.
On Nov 27, 2014 4:15 PM, "andrejb" <notifications@github.com> wrote:

> In client/src/leap/soledad/client/sqlcipher.py:
>
> > @@ -486,6 +486,10 @@ def sync(self, url, creds=None, autocreate=True, defer_decryption=True):
> >              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...")
> > +                syncer.sync_target._conn = None
>
> Could we use syncer.sync_target.close() here to avoid accessing a private
> attribute?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/leapcode/soledad/pull/185/files#r21007439>.
>