fix: remove unnecessary context setting in processPendingTask

This commit is contained in:
krau
2024-10-11 16:26:53 +08:00
parent 7a288e3155
commit 0d369c7c79

View File

@@ -29,7 +29,7 @@ func processPendingTask(task types.Task) error {
return err
}
_, err = common.ReqClient.R().SetContext(task.Ctx).SetOutputFile(task.FileName).SetDownloadCallbackWithInterval(func(info req.DownloadInfo) {
_, err = common.ReqClient.R().SetOutputFile(task.FileName).SetDownloadCallbackWithInterval(func(info req.DownloadInfo) {
if info.Response == nil || info.Response.Response == nil || info.Response.Response.StatusCode != 200 {
return
}