aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyproject.toml2
-rwxr-xr-xtunneltop/tunneltop.py7
2 files changed, 4 insertions, 5 deletions
diff --git a/pyproject.toml b/pyproject.toml
index be76317..ad57e70 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tunneltop"
-version = "0.3.5"
+version = "0.3.6"
description = "A top-like tunnel manager"
authors = ["terminaldweller <devi@terminaldweller.com>"]
license = "GPL-3.0"
diff --git a/tunneltop/tunneltop.py b/tunneltop/tunneltop.py
index ecbbaa8..984f6c9 100755
--- a/tunneltop/tunneltop.py
+++ b/tunneltop/tunneltop.py
@@ -521,13 +521,12 @@ class TunnelManager:
# when we want to quit
self.are_we_dying = True
+ # we don't have a task hierarchy so we just kill all
+ # of them without having to kill the descendants first
for task in asyncio.all_tasks():
task.cancel()
await asyncio.sleep(0)
- try:
- await asyncio.gather(*asyncio.all_tasks())
- finally:
- sys.exit(0)
+ await asyncio.sleep(1)
async def revive_failed_tasks(self) -> None:
"""Revives failed tasks"""