fix(http): skip prefetch wait for restored downloads (#1584)

This commit is contained in:
Kunpeng Xie authored and GitHub committed 2026-10-12 11:13:42 +08:00
1 parent c6619794fc
commit fa622a4063
2 files changed
+80 -1

No files matched your search

+1 -1
View File
@@ -609,7 +609,7 @@ func (f *Fetcher) stopPrefetchAndCopyData() int64 {
}
// Wait for prefetch to finish (with timeout)
for i := 0; i < 1000 && !f.prefetchDone.Load(); i++ {
for i := 0; f.prefetchStopCh != nil && i < 1000 && !f.prefetchDone.Load(); i++ {
time.Sleep(10 * time.Millisecond)
}