diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-04-04 12:14:17 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-04-04 12:14:17 -0300 |
commit | 0d283e11e094e8537f3e8e4879aeca69169cffd1 (patch) | |
tree | aa6d057804142692a078b849f345335f15acdee4 /common/src/leap | |
parent | 7bc94242398ad220908a214d0f457db017396f81 (diff) | |
parent | c3f5e9a6b340db969844a662c27fcb2b3f7596b9 (diff) |
Merge remote-tracking branch 'refs/remotes/drebs/bug/5448_add-workaround-for-hanging-requests-after-multipart-put' into develop
Diffstat (limited to 'common/src/leap')
-rw-r--r-- | common/src/leap/soledad/common/couch.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/src/leap/soledad/common/couch.py b/common/src/leap/soledad/common/couch.py index ebe8477f..1bb84985 100644 --- a/common/src/leap/soledad/common/couch.py +++ b/common/src/leap/soledad/common/couch.py @@ -855,6 +855,7 @@ class CouchDatabase(CommonBackend): try: self._database.resource.put_json( doc.doc_id, body=buf.getvalue(), headers=envelope.headers) + self._renew_couch_session() except ResourceConflict: raise RevisionConflict() @@ -1415,6 +1416,15 @@ class CouchDatabase(CommonBackend): continue yield t._doc + def _renew_couch_session(self): + """ + Create a new couch connection session. + + This is a workaround for #5448. Will not be needed once bigcouch is + merged with couchdb. + """ + self._database.resource.session = Session(timeout=COUCH_TIMEOUT) + class CouchSyncTarget(CommonSyncTarget): """ |