Prevent proofOfWork pool threads from returning any data if shut down before finished with a POW

This commit is contained in:
Jonathan Warren 2013-06-19 00:51:31 -04:00
parent aeeb7c9878
commit 9d7a869cb9

View File

@ -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():