fix subprocesspow keyboard interrupt not being catched

This commit is contained in:
Kevin Froman 2020-08-21 10:44:59 -05:00
parent 308fca7c22
commit 02fde0ad70

View File

@ -116,7 +116,10 @@ class SubprocessPOW:
while True: while True:
# Break if shutdown received # Break if shutdown received
if pipe.poll() and pipe.recv() == 'shutdown': try:
if pipe.poll() and pipe.recv() == 'shutdown':
break
except KeyboardInterrupt:
break break
# Load nonce into block metadata # Load nonce into block metadata
metadata['pow'] = nonce metadata['pow'] = nonce