Skip to content

Commit

Permalink
Rev2099, Keep tor client running until update finished
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Jun 5, 2017
1 parent 1d06d30 commit 742c2fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Config(object):

def __init__(self, argv):
self.version = "0.5.5"
self.rev = 2098
self.rev = 2099
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"
Expand Down
2 changes: 0 additions & 2 deletions src/Ui/UiWebsocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,6 @@ def actionSiteSetLimit(self, to, size_limit):
def actionServerUpdate(self, to):
self.cmd("updating")
sys.modules["main"].update_after_shutdown = True
if sys.modules["main"].file_server.tor_manager.tor_process:
sys.modules["main"].file_server.tor_manager.stopTor()
SiteManager.site_manager.save()
sys.modules["main"].file_server.stop()
sys.modules["main"].ui_server.stop()
Expand Down
3 changes: 3 additions & 0 deletions zeronet.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def main():
if main.update_after_shutdown: # Updater
import gc
import update
import atexit
# Try cleanup openssl
try:
if "lib.opensslVerify" in sys.modules:
Expand Down Expand Up @@ -48,6 +49,8 @@ def main():
handler.close()
logger.removeHandler(handler)

atexit._run_exitfuncs()

except Exception, err: # Prevent closing
import traceback
try:
Expand Down

0 comments on commit 742c2fe

Please sign in to comment.