mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-07-20 21:48:50 -04:00
Fixed occasional io thread hang on shutdown
This commit is contained in:
parent
da8a0ee5e9
commit
bfe5b876de
2 changed files with 1 additions and 1 deletions
|
@ -173,6 +173,7 @@ class Reticulum:
|
||||||
# classes, saving necessary information to disk and carrying
|
# classes, saving necessary information to disk and carrying
|
||||||
# out cleanup operations.
|
# out cleanup operations.
|
||||||
if not Reticulum.__exit_handler_ran:
|
if not Reticulum.__exit_handler_ran:
|
||||||
|
Reticulum.__exit_handler_ran = True
|
||||||
if not Reticulum.__interface_detach_ran:
|
if not Reticulum.__interface_detach_ran:
|
||||||
RNS.Transport.detach_interfaces()
|
RNS.Transport.detach_interfaces()
|
||||||
RNS.Transport.exit_handler()
|
RNS.Transport.exit_handler()
|
||||||
|
|
|
@ -373,7 +373,6 @@ def exit(code=0):
|
||||||
global exit_called
|
global exit_called
|
||||||
if not exit_called:
|
if not exit_called:
|
||||||
exit_called = True
|
exit_called = True
|
||||||
print("")
|
|
||||||
Reticulum.exit_handler()
|
Reticulum.exit_handler()
|
||||||
os._exit(code)
|
os._exit(code)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue