tlnbase: fix shutdown when lnbase has exception in main_loop - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 483ec421565368f2d4a29ed8e95711fbba0d0050 DIR parent e906e6e90af706ccc7a727e6c4dbd0655816d635 HTML Author: Janus <ysangkok@gmail.com> Date: Thu, 12 Apr 2018 15:21:51 +0200 lnbase: fix shutdown when lnbase has exception in main_loop Diffstat: M lib/lnbase.py | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) --- DIR diff --git a/lib/lnbase.py b/lib/lnbase.py t@@ -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')