fix: http download fail (#61)

This commit is contained in:
Li Wei authored and GitHub committed 2022-12-14 12:12:39 +08:00
1 parent c62867e3ef
commit 0a4be165a5
14 files changed
+113 -54

No files matched your search

+9 -5
View File
@@ -142,12 +142,16 @@ func doDownloadReady(f fetcher.Fetcher, listener net.Listener, connections int,
if err != nil {
t.Fatal(err)
}
opts = &base.Options{
Name: test.DownloadName,
Path: test.Dir,
Extra: http.OptsExtra{
var extra any = nil
if connections > 0 {
extra = http.OptsExtra{
Connections: connections,
},
}
}
opts = &base.Options{
Name: test.DownloadName,
Path: test.Dir,
Extra: extra,
}
err = fetcher.Create(res, opts)
if err != nil {