summaryrefslogtreecommitdiff
path: root/client/src/leap
diff options
context:
space:
mode:
authorBruno Wagner <bwgpro@gmail.com>2015-08-07 18:34:12 -0300
committerBruno Wagner <bwgpro@gmail.com>2015-08-12 17:17:19 -0300
commitfa45b38b2cf61d5619e8d9d063fb1a470ab4f086 (patch)
treec7962722102047a82a092a0dce528955021d7082 /client/src/leap
parent7c1f5e3bcbfd881b6b1b3f258066a13ee7a4839d (diff)
[bug] Encdecpool won't explode if stopped twice
The encryption pool could be stopped twice and would break on the second attempt because it deletes the encryption queue variable. Added a condition to make sure it only deletes the encryption queue if it exists, making it more idempotent
Diffstat (limited to 'client/src/leap')
-rw-r--r--client/src/leap/soledad/client/encdecpool.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/leap/soledad/client/encdecpool.py b/client/src/leap/soledad/client/encdecpool.py
index 8713497e..4cdb3cd4 100644
--- a/client/src/leap/soledad/client/encdecpool.py
+++ b/client/src/leap/soledad/client/encdecpool.py
@@ -191,10 +191,11 @@ class SyncEncrypterPool(SyncEncryptDecryptPool):
Stop the encrypter pool.
"""
# close the sync queue
- self._encr_queue.close()
- q = self._encr_queue
- del q
- self._encr_queue = None
+ if self._encr_queue:
+ self._encr_queue.close()
+ q = self._encr_queue
+ del q
+ self._encr_queue = None
SyncEncryptDecryptPool.stop(self)