mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-11 12:12:56 -03:00
Merge pull request #768 from mig5/start_web_thread_earlier_than_onion_service
Start the WebThread earlier than the Onion service. This gives it a c…
This commit is contained in:
commit
fe9b510a9e
1 changed files with 8 additions and 8 deletions
|
@ -41,14 +41,6 @@ class OnionThread(QtCore.QThread):
|
|||
def run(self):
|
||||
self.mode.common.log('OnionThread', 'run')
|
||||
|
||||
try:
|
||||
self.mode.app.start_onion_service()
|
||||
self.success.emit()
|
||||
|
||||
except (TorTooOld, TorErrorInvalidSetting, TorErrorAutomatic, TorErrorSocketPort, TorErrorSocketFile, TorErrorMissingPassword, TorErrorUnreadableCookieFile, TorErrorAuthError, TorErrorProtocolError, BundledTorTimeout, OSError) as e:
|
||||
self.error.emit(e.args[0])
|
||||
return
|
||||
|
||||
self.mode.app.stay_open = not self.mode.common.settings.get('close_after_first_download')
|
||||
|
||||
# start onionshare http service in new thread
|
||||
|
@ -58,6 +50,14 @@ class OnionThread(QtCore.QThread):
|
|||
# wait for modules in thread to load, preventing a thread-related cx_Freeze crash
|
||||
time.sleep(0.2)
|
||||
|
||||
try:
|
||||
self.mode.app.start_onion_service()
|
||||
self.success.emit()
|
||||
|
||||
except (TorTooOld, TorErrorInvalidSetting, TorErrorAutomatic, TorErrorSocketPort, TorErrorSocketFile, TorErrorMissingPassword, TorErrorUnreadableCookieFile, TorErrorAuthError, TorErrorProtocolError, BundledTorTimeout, OSError) as e:
|
||||
self.error.emit(e.args[0])
|
||||
return
|
||||
|
||||
|
||||
class WebThread(QtCore.QThread):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue