Browse Source
lnbase: fix shutdown when lnbase has exception in main_loop
regtest_lnd
Janus
7 years ago
committed by
SomberNight
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
5 additions and
0 deletions
-
lib/lnbase.py
|
|
@ -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') |
|
|
|