Skip to content

Commit

Permalink
Avoid nil panic when downloadSpeedLimit is set in api mode
Browse files Browse the repository at this point in the history
  • Loading branch information
iofq authored and neolynx committed Aug 16, 2024
1 parent 9591548 commit 372ce3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func NewDownloader(downLimit int64, maxTries int, progress aptly.Progress) aptly
downloader.aggWriter = io.Discard
}
if downLimit > 0 {
downloader.aggWriter = flowrate.NewWriter(progress, downLimit)
downloader.aggWriter = flowrate.NewWriter(downloader.aggWriter, downLimit)
}

downloader.client.CheckRedirect = downloader.checkRedirect
Expand Down

0 comments on commit 372ce3c

Please sign in to comment.