From 462330031a69bc6653535c4e625fb3cce075d914 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 30 Sep 2024 10:27:32 -0500 Subject: [PATCH] fix: py38 --- src/aiohappyeyeballs/staggered.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aiohappyeyeballs/staggered.py b/src/aiohappyeyeballs/staggered.py index f9bcb63..29c9ca7 100644 --- a/src/aiohappyeyeballs/staggered.py +++ b/src/aiohappyeyeballs/staggered.py @@ -165,6 +165,9 @@ def _on_completion( timer.cancel() finally: + # If there are any tasks left, cancel them + # since we either have a winner or a KeyboardInterrupt + # or SystemExit. for task in tasks: task.cancel()