mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-13 00:09:38 -05:00
Make it impossible to cancel a share mid-startup, to avoid a thread segfault issue. Only autostart mode can cancel a share (after it is scheduled)
This commit is contained in:
parent
2c73c0b1b0
commit
64c7f4e5b8
@ -33,7 +33,7 @@
|
||||
"gui_show_url_qr_code": "Show QR Code",
|
||||
"gui_qr_code_dialog_title": "OnionShare QR Code",
|
||||
"gui_waiting_to_start": "Scheduled to start in {}. Click to cancel.",
|
||||
"gui_please_wait": "Starting… Click to cancel.",
|
||||
"gui_please_wait": "Starting…",
|
||||
"error_rate_limit": "Someone has made too many wrong attempts to guess your password, so OnionShare has stopped the server. Start sharing again and send the recipient a new address to share.",
|
||||
"zip_progress_bar_format": "Compressing: %p%",
|
||||
"gui_settings_window_title": "Settings",
|
||||
|
@ -354,14 +354,6 @@ class Mode(QtWidgets.QWidget):
|
||||
self.app.onion.scheduled_key = None
|
||||
self.app.onion.scheduled_auth_cookie = None
|
||||
self.startup_thread.quit()
|
||||
if self.onion_thread:
|
||||
self.common.log("Mode", "cancel_server: quitting onion thread")
|
||||
self.onion_thread.terminate()
|
||||
self.onion_thread.wait()
|
||||
if self.web_thread:
|
||||
self.common.log("Mode", "cancel_server: quitting web thread")
|
||||
self.web_thread.terminate()
|
||||
self.web_thread.wait()
|
||||
self.stop_server()
|
||||
|
||||
def cancel_server_custom(self):
|
||||
|
@ -379,7 +379,7 @@ class ServerStatus(QtWidgets.QWidget):
|
||||
self.start_server()
|
||||
elif self.status == self.STATUS_STARTED:
|
||||
self.stop_server()
|
||||
elif self.status == self.STATUS_WORKING:
|
||||
elif self.status == self.STATUS_WORKING and self.settings.get("general", "autostart_timer"):
|
||||
self.cancel_server()
|
||||
self.button_clicked.emit()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user