mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-07 17:10:29 +00:00
fix: http download fail (#61)
This commit is contained in:
1 parent
c62867e3ef
commit
0a4be165a5
14 files changed
+113
-54
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user