Merge branch 'fix_stay_open' of https://github.com/mig5/onionshare into mig5-fix_stay_open

This commit is contained in:
Micah Lee 2017-05-22 17:03:01 -07:00
commit e626a410f3
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -221,7 +221,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
settings = Settings()
settings.load()
self.app.set_stealth(settings.get('use_stealth'))
web.set_stay_open(not settings.get('close_after_first_download'))
# Reset web counters
web.download_count = 0
@ -239,6 +238,9 @@ class OnionShareGui(QtWidgets.QMainWindow):
return
# start onionshare http service in new thread
# First, load settings and configure
self.app.stay_open = not self.settings.get('close_after_first_download')
common.log('OnionShareGUI', 'stay_open', 'stay_open={}'.format(self.app.stay_open))
t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open))
t.daemon = True
t.start()