From edd189a8a83ec690452fcb725b6dcca9ba68ca56 Mon Sep 17 00:00:00 2001 From: Levi Date: Tue, 24 Dec 2024 22:23:20 +0800 Subject: [PATCH] fix: failed to delete a running task (#852) --- pkg/download/downloader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/download/downloader.go b/pkg/download/downloader.go index 7165027e..844396b8 100644 --- a/pkg/download/downloader.go +++ b/pkg/download/downloader.go @@ -826,7 +826,7 @@ func (d *Downloader) watch(task *Task) { } // When delete a not resolved task, need check if the task resource is nil - if task.Meta.Res == nil { + if task.Meta.Res == nil || d.GetTask(task.ID) == nil { return }