lnbase: fix shutdown when lnbase has exception in main_loop
This commit is contained in:
parent
c05e429416
commit
208a6870ac
@ -349,6 +349,11 @@ class Peer(PrintError):
|
||||
msg = await self.read_message()
|
||||
self.process_message(msg)
|
||||
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()
|
||||
# close socket
|
||||
self.print_error('closing lnbase')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user