Browse Source

Remove useless re-raise of cancellation

master
Neil Booth 8 years ago
parent
commit
d85034353f
  1. 8
      electrumx_server.py
  2. 1
      server/block_processor.py

8
electrumx_server.py

@ -42,12 +42,8 @@ def main_loop():
loop.add_signal_handler(getattr(signal, signame),
partial(on_signal, signame))
try:
loop.run_until_complete(future)
except asyncio.CancelledError:
pass
finally:
loop.close()
loop.run_until_complete(future)
loop.close()
def main():

1
server/block_processor.py

@ -388,7 +388,6 @@ class BlockProcessor(server.db.DB):
self.on_cancel()
# This lets the asyncio subsystem process futures cancellations
await asyncio.sleep(0)
raise
def on_cancel(self):
'''Called when the main loop is cancelled.

Loading…
Cancel
Save