Skip to content

Commit

Permalink
Merge branch 'main' into feat/default_direct_download
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie authored Sep 7, 2024
2 parents 08f05e7 + a198132 commit 453ad1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/protocol/http/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,12 @@ func (f *Fetcher) Create(opts *base.Options) error {
opts.Extra = &fhttp.OptsExtra{}
}
extra := opts.Extra.(*fhttp.OptsExtra)
if extra.Connections == 0 {
if extra.Connections <= 0 {
extra.Connections = f.config.Connections
// Avoid zero connections configuration
if extra.Connections <= 0 {
extra.Connections = 1
}
}
return nil
}
Expand Down

0 comments on commit 453ad1f

Please sign in to comment.