Fix stay_open regression bug. Before, it was closing automatically even when the setting wasn't set. Also, remove the --stay-open option from the GUI, since GUI settings are set in the settings dialog not cli args

This commit is contained in:
Micah Lee 2018-05-04 16:35:32 -07:00
parent dcea459580
commit e32e850548
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
6 changed files with 8 additions and 17 deletions

View file

@ -144,7 +144,7 @@ class Mode(QtWidgets.QWidget):
self.app.choose_port()
# Start http service in new thread
t = threading.Thread(target=self.web.start, args=(self.app.port, self.app.stay_open, self.common.settings.get('slug')))
t = threading.Thread(target=self.web.start, args=(self.app.port, not self.common.settings.get('close_after_first_download'), self.common.settings.get('slug')))
t.daemon = True
t.start()
@ -161,8 +161,6 @@ class Mode(QtWidgets.QWidget):
self.starting_server_error.emit(e.args[0])
return
self.app.stay_open = not self.common.settings.get('close_after_first_download')
self.common.log('Mode', 'start_server', 'Starting an onion thread')
self.t = OnionThread(self.common, function=start_onion_service, kwargs={'self': self})
self.t.daemon = True