mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 01:20:27 +00:00
fix(http): skip prefetch wait for restored downloads (#1584)
This commit is contained in:
1 parent
c6619794fc
commit
fa622a4063
2 files changed
+80
-1
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user