mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 09:30:27 +00:00
fix: crash caused by non-resumable http download resources (#97)
This commit is contained in:
1 parent
f42838810a
commit
dd46e7a3eb
2 files changed
+2
-1
No files matched your search
@@ -250,7 +250,7 @@ func (f *Fetcher) filepath() string {
|
||||
func (f *Fetcher) fetch() {
|
||||
f.ctx, f.cancel = context.WithCancel(context.Background())
|
||||
eg, _ := errgroup.WithContext(f.ctx)
|
||||
for i := 0; i < f.meta.Opts.Extra.(*fhttp.OptsExtra).Connections; i++ {
|
||||
for i := 0; i < len(f.chunks); i++ {
|
||||
i := i
|
||||
eg.Go(func() error {
|
||||
return f.fetchChunk(i)
|
||||
|
||||
Reference in new issue
Block a user