mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
Fix shutdown before file_server started
This commit is contained in:
parent
bfc5e2dce6
commit
c7ea66bfef
1 changed files with 2 additions and 3 deletions
|
@ -14,10 +14,9 @@ last_error = None
|
|||
def shutdown(reason="Unknown"):
|
||||
logging.info("Shutting down (reason: %s)..." % reason)
|
||||
import main
|
||||
if "file_server" in dir(main) and main.file_server.running:
|
||||
if "file_server" in dir(main):
|
||||
try:
|
||||
if "file_server" in dir(main):
|
||||
gevent.spawn(main.file_server.stop)
|
||||
gevent.spawn(main.file_server.stop)
|
||||
if "ui_server" in dir(main):
|
||||
gevent.spawn(main.ui_server.stop)
|
||||
except Exception as err:
|
||||
|
|
Loading…
Reference in a new issue