summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-12-01 15:58:57 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-12-01 15:58:57 -0300
commit55f45b770a57d1c5f54a66a490aeeea7edae0184 (patch)
tree765bcaec6b4258e74fdc64761da0bbc616c2b0b9
parent332ce9e68a34e2ddc31ef371c991565e5e38812b (diff)
[bug] fire callback after reseting instance vars
If we reset the vars after firing the finish callback, other thread can pick up a dirty state on due concurrency.
-rw-r--r--client/src/leap/soledad/client/encdecpool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/src/leap/soledad/client/encdecpool.py b/client/src/leap/soledad/client/encdecpool.py
index 6d3c11b9..9333578b 100644
--- a/client/src/leap/soledad/client/encdecpool.py
+++ b/client/src/leap/soledad/client/encdecpool.py
@@ -807,6 +807,6 @@ class SyncDecrypterPool(SyncEncryptDecryptPool):
self._finish()
def _finish(self):
- self._deferred.callback(None)
self._processed_docs = 0
self._last_inserted_idx = 0
+ self._deferred.callback(None)