mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 17:40:28 +00:00
fix(http): reset discarded prefetch progress on resume (#1462)
This commit is contained in:
6 files changed
+93
-9
No files matched your search
@@ -584,6 +584,10 @@ func (f *Fetcher) cleanupPrefetchFile() {
|
||||
os.Remove(f.prefetchFilePath)
|
||||
f.prefetchFilePath = ""
|
||||
}
|
||||
// The byte count is only reusable while the backing prefetch file exists.
|
||||
// Pause may discard that file before the first Start, so retaining the
|
||||
// count would make the next Start skip bytes that were never copied.
|
||||
f.prefetchSize.Store(0)
|
||||
}
|
||||
|
||||
func (f *Fetcher) Start() error {
|
||||
|
||||
Reference in new issue
Block a user