mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-10 07:10:31 -04:00
Fixes for the edge case where Tor connection dialog is canceled, but the Tor process remains open in the background, which was causing onion.is_authenticated() to True. Remove excessive alerts
This commit is contained in:
parent
b442b5d41b
commit
6f4d7f7f44
5 changed files with 15 additions and 8 deletions
|
@ -176,6 +176,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
quit, or open settings.
|
||||
"""
|
||||
common.log('OnionShareGui', '_tor_connection_canceled')
|
||||
self.timer.stop()
|
||||
|
||||
def ask():
|
||||
a = Alert(strings._('gui_tor_connection_ask', True), QtWidgets.QMessageBox.Question, buttons=QtWidgets.QMessageBox.NoButton, autostart=False)
|
||||
|
@ -394,11 +395,14 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
"""
|
||||
self.update()
|
||||
|
||||
# Has the Tor Connection dialog finished, but we've since lost connection to Tor somehow?
|
||||
if not self.onion.is_authenticated() and self.tor_con.t.isFinished():
|
||||
self.timer.stop()
|
||||
self.start_server_error(strings._('error_tor_protocol_error'))
|
||||
self._tor_connection_canceled()
|
||||
# Have we lost connection to Tor somehow?
|
||||
if self.tor_con.t.isFinished():
|
||||
if not self.onion.is_authenticated():
|
||||
self.timer.stop()
|
||||
if self.server_status.status != self.server_status.STATUS_STOPPED:
|
||||
self.server_status.stop_server()
|
||||
self.status_bar.clearMessage()
|
||||
self._tor_connection_canceled()
|
||||
|
||||
# scroll to the bottom of the dl progress bar log pane
|
||||
# if a new download has been added
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue