From 80e73162498f06985f7892caca06888ec1849338 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 12 Nov 2021 11:58:48 +1100 Subject: [PATCH] Allow website mode to stop even if people have viewed it --- cli/onionshare_cli/__init__.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/cli/onionshare_cli/__init__.py b/cli/onionshare_cli/__init__.py index 1c26b050..060c5628 100644 --- a/cli/onionshare_cli/__init__.py +++ b/cli/onionshare_cli/__init__.py @@ -464,13 +464,7 @@ def main(cwd=None): print("Stopped because auto-stop timer ran out") web.stop(app.port) break - if mode == "website": - # If there were no attempts to visit the website, or all downloads are done, we can stop - if web.website_mode.cur_history_id == 0 or web.done: - print("Stopped because auto-stop timer ran out") - web.stop(app.port) - break - if mode == "receive": + elif mode == "receive": if ( web.receive_mode.cur_history_id == 0 or not web.receive_mode.uploads_in_progress @@ -479,7 +473,8 @@ def main(cwd=None): web.stop(app.port) break web.receive_mode.can_upload = False - if mode == "chat": + else: + # website or chat mode print("Stopped because auto-stop timer ran out") web.stop(app.port) break