mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 16:40:32 +00:00
The prefetch goroutine sets prefetchDone only after one more read and closing the body. A Start in that window took the whole file as the fallback snapshot, expandConnections marked the task done, and the temp file was never copied, leaving a zero-filled target. Read prefetchSize once and treat the prefetch as complete when it reached the known size.