mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-12-22 11:50:18 +00:00
Updated exit handler
This commit is contained in:
parent
712273dd14
commit
ce270f4615
@ -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)
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user