mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-13 08:19:28 -05:00
Ensure we always set the service id, so we can stop the right one (particularly when scheduling a share)
This commit is contained in:
parent
60de9fd335
commit
9ce2c5cedf
@ -666,8 +666,7 @@ class Onion(object):
|
||||
onion_host = res.service_id + ".onion"
|
||||
|
||||
# Save the service_id
|
||||
if not mode_settings.get("general", "service_id"):
|
||||
mode_settings.set("general", "service_id", res.service_id)
|
||||
mode_settings.set("general", "service_id", res.service_id)
|
||||
|
||||
# Save the private key and hidservauth string if persistence is enabled
|
||||
if mode_settings.get("persistent", "enabled"):
|
||||
@ -712,7 +711,6 @@ class Onion(object):
|
||||
"""
|
||||
onion_host = mode_settings.get("general", "service_id")
|
||||
self.common.log("Onion", "stop_onion_service", f"onion host: {onion_host}")
|
||||
|
||||
try:
|
||||
self.c.remove_ephemeral_hidden_service(
|
||||
mode_settings.get("general", "service_id")
|
||||
|
@ -76,7 +76,7 @@ class OnionThread(QtCore.QThread):
|
||||
time.sleep(0.2)
|
||||
self.success_early.emit()
|
||||
# Unregister the onion so we can use it in the next OnionThread
|
||||
self.mode.app.onion.cleanup(False)
|
||||
self.mode.app.stop_onion_service(self.mode.settings)
|
||||
else:
|
||||
self.mode.app.start_onion_service(
|
||||
self.mode.settings, await_publication=True
|
||||
|
Loading…
Reference in New Issue
Block a user