From 9d7a869cb95e64f6a1c09a3de8e65cb7833d4193 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 19 Jun 2013 00:51:31 -0400 Subject: [PATCH] Prevent proofOfWork pool threads from returning any data if shut down before finished with a POW --- src/proofofwork.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/proofofwork.py b/src/proofofwork.py index b8369087..f65c127f 100644 --- a/src/proofofwork.py +++ b/src/proofofwork.py @@ -58,7 +58,8 @@ def _doFastPoW(target, initialHash): while True: if shared.shutdown: pool.terminate() - pool.join() #Don't return anything (doing so will cause exceptions because we'll return an unusable response). Sit here and wait for this thread to close. + while True: + time.sleep(10) # Don't let this thread return here; it will return nothing and cause an exception in bitmessagemain.py return for i in range(pool_size): if result[i].ready():