Browse Source

lnbase: fix shutdown when lnbase has exception in main_loop

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
Janus 7 years ago
committed by ThomasV
parent
commit
483ec42156
  1. 5
      lib/lnbase.py

5
lib/lnbase.py

@ -349,6 +349,11 @@ class Peer(PrintError):
msg = await self.read_message() msg = await self.read_message()
self.process_message(msg) self.process_message(msg)
except: except:
# if the loop isn't stopped
# run_forever in network.py would not return,
# the asyncioThread would not die,
# and we would block on shutdown
asyncio.get_event_loop().stop()
traceback.print_exc() traceback.print_exc()
# close socket # close socket
self.print_error('closing lnbase') self.print_error('closing lnbase')

Loading…
Cancel
Save