Fixed wrong task object removed from self.tasks within self.cancel

This commit is contained in:
nocturn9x 2021-08-27 09:14:15 +02:00
parent a472116686
commit 0916d9634c
1 changed files with 1 additions and 1 deletions

View File

@ -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