mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-05 07:55:23 -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
|
@ -86,6 +86,7 @@ class TorConnectionDialog(QtWidgets.QProgressDialog):
|
|||
def _canceled_connecting_to_tor(self):
|
||||
common.log('TorConnectionDialog', '_canceled_connecting_to_tor')
|
||||
self.active = False
|
||||
self.onion.cleanup()
|
||||
|
||||
# Cancel connecting to Tor
|
||||
QtCore.QTimer.singleShot(1, self.cancel)
|
||||
|
@ -126,7 +127,7 @@ class TorConnectionThread(QtCore.QThread):
|
|||
# Connect to the Onion
|
||||
try:
|
||||
self.onion.connect(self.settings, False, self._tor_status_update)
|
||||
if self.onion.is_authenticated():
|
||||
if self.onion.connected_to_tor:
|
||||
self.connected_to_tor.emit()
|
||||
else:
|
||||
self.canceled_connecting_to_tor.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue