Updated exit handler

pull/4/head
Mark Qvist 2018-04-26 01:31:43 +02:00
rodzic 712273dd14
commit ce270f4615
2 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -402,6 +402,7 @@ def link_closed(link):
else:
RNS.log("Link closed, exiting now")
RNS.Reticulum.exit_handler()
time.sleep(1.5)
os._exit(0)

Wyświetl plik

@ -26,6 +26,11 @@ class Reticulum:
storagepath = ""
cachepath = ""
@staticmethod
def exit_handler():
RNS.Transport.exitHandler()
RNS.Identity.exitHandler()
def __init__(self,configdir=None):
if configdir != None:
Reticulum.configdir = configdir
@ -59,8 +64,7 @@ class Reticulum:
RNS.Transport.start()
atexit.register(RNS.Transport.exitHandler)
atexit.register(RNS.Identity.exitHandler)
atexit.register(Reticulum.exit_handler)
def applyConfig(self):
if "logging" in self.config: