mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-16 12:08:04 +00:00
Rate limit 0 effectively disables rate limiting
This commit is contained in:
+3
-1
@@ -123,7 +123,9 @@ func (d *GrabDownloader) download(ctx context.Context, url string, destination s
|
|||||||
d.log("Error creating new request: %v\n", err)
|
d.log("Error creating new request: %v\n", err)
|
||||||
return errors.Wrap(err, url)
|
return errors.Wrap(err, url)
|
||||||
}
|
}
|
||||||
req.RateLimiter = rate.NewLimiter(rate.Limit(d.downLimit), int(d.downLimit))
|
if d.downLimit > 0 {
|
||||||
|
req.RateLimiter = rate.NewLimiter(rate.Limit(d.downLimit), int(d.downLimit))
|
||||||
|
}
|
||||||
|
|
||||||
d.maybeSetupChecksum(req, expected)
|
d.maybeSetupChecksum(req, expected)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user