From 206472cb78387f3b3ab8962d3f182dc47c057637 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Thu, 18 Jan 2018 22:42:43 +1100 Subject: [PATCH] load Settings in onionshare/__init__.py before we initiate the web thread, since it needs to send the saved slug to the web server --- onionshare/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionshare/__init__.py b/onionshare/__init__.py index e7e34ed9..76d2b601 100644 --- a/onionshare/__init__.py +++ b/onionshare/__init__.py @@ -115,6 +115,7 @@ def main(cwd=None): print('') # Start OnionShare http service in new thread + settings.load() t = threading.Thread(target=web.start, args=(app.port, app.stay_open, settings.get('slug'))) t.daemon = True t.start() @@ -128,7 +129,6 @@ def main(cwd=None): app.shutdown_timer.start() # Save the web slug if we are using a persistent private key - settings.load() if settings.get('save_private_key'): if not settings.get('slug'): settings.set('slug', web.slug)