diff options
author | Miguel Jacq <mig@mig5.net> | 2021-11-12 11:58:48 +1100 |
---|---|---|
committer | Miguel Jacq <mig@mig5.net> | 2021-11-12 11:58:48 +1100 |
commit | 80e73162498f06985f7892caca06888ec1849338 (patch) | |
tree | 4c564808a7e1102fd8d1582ca0a5d4eb288d99db | |
parent | f5e4d70731274be3f4cc3c8ad4c9e1b65ffa0ccc (diff) | |
download | onionshare-80e73162498f06985f7892caca06888ec1849338.tar.gz onionshare-80e73162498f06985f7892caca06888ec1849338.zip |
Allow website mode to stop even if people have viewed it
-rw-r--r-- | cli/onionshare_cli/__init__.py | 11 |
1 files 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 |