fix(net): 0KB file download error

This commit is contained in:
hpy hs 2025-05-27 09:24:41 +08:00
parent ffa03bfda1
commit 4ceefb97ab

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 {