fix(net):empty file download error (#282)

This commit is contained in:
hshpy
2025-06-22 14:21:45 +08:00
committed by GitHub
parent b5c1386645
commit 639b5cf7c2

View File

@ -165,6 +165,10 @@ func (d *downloader) download() (io.ReadCloser, error) {
if maxPart < d.cfg.Concurrency {
d.cfg.Concurrency = maxPart
}
if d.params.Range.Length == 0 {
d.cfg.Concurrency = 1
}
log.Debugf("cfgConcurrency:%d", d.cfg.Concurrency)
if d.cfg.Concurrency == 1 {