From 0916d9634cbfcc18e94b0f0d6c02b7ddcdbf3693 Mon Sep 17 00:00:00 2001 From: nocturn9x Date: Fri, 27 Aug 2021 09:14:15 +0200 Subject: [PATCH] Fixed wrong task object removed from self.tasks within self.cancel --- giambio/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/giambio/core.py b/giambio/core.py index 023da2a..fd28f23 100644 --- a/giambio/core.py +++ b/giambio/core.py @@ -689,7 +689,7 @@ class AsyncScheduler: task.status = "cancelled" self.io_release_task(self.current_task) self.debugger.after_cancel(task) - self.tasks.remove(self.current_task) + self.tasks.remove(task) else: # If the task ignores our exception, we'll # raise it later again