fix: failed to delete a running task (#852)

This commit is contained in:
Levi authored and GitHub committed 2024-12-24 22:23:20 +08:00
1 parent c970378fd7
commit edd189a8a8
1 file changed
+1 -1
+1 -1
View File
@@ -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
}