From 981220d1ce3096ec7e30e6d375239edf6358a3e8 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 29 Nov 2019 16:52:00 +1100 Subject: [PATCH] Fix the autostop sharing - a mere history item count of > 0 should not be interpreted as an in-progress download when the timer runs out --- onionshare_gui/tab/mode/share_mode/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionshare_gui/tab/mode/share_mode/__init__.py b/onionshare_gui/tab/mode/share_mode/__init__.py index 9d22e401..1423d60a 100644 --- a/onionshare_gui/tab/mode/share_mode/__init__.py +++ b/onionshare_gui/tab/mode/share_mode/__init__.py @@ -176,7 +176,7 @@ class ShareMode(Mode): The auto-stop timer expired, should we stop the server? Returns a bool """ # If there were no attempts to download the share, or all downloads are done, we can stop - if self.web.share_mode.cur_history_id == 0 or self.web.done: + if self.history.in_progress_count == 0 or self.web.done: self.server_status.stop_server() self.server_status_label.setText(strings._("close_on_autostop_timer")) return True