mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-18 17:38:07 +08:00
fix(net):empty file download error (#282)
This commit is contained in:
@ -165,6 +165,10 @@ func (d *downloader) download() (io.ReadCloser, error) {
|
|||||||
if maxPart < d.cfg.Concurrency {
|
if maxPart < d.cfg.Concurrency {
|
||||||
d.cfg.Concurrency = maxPart
|
d.cfg.Concurrency = maxPart
|
||||||
}
|
}
|
||||||
|
if d.params.Range.Length == 0 {
|
||||||
|
d.cfg.Concurrency = 1
|
||||||
|
}
|
||||||
|
|
||||||
log.Debugf("cfgConcurrency:%d", d.cfg.Concurrency)
|
log.Debugf("cfgConcurrency:%d", d.cfg.Concurrency)
|
||||||
|
|
||||||
if d.cfg.Concurrency == 1 {
|
if d.cfg.Concurrency == 1 {
|
||||||
|
Reference in New Issue
Block a user