cmd/torrent: Lower burst when there's a download rate limit
This commit is contained in:
parent
cc0d223a65
commit
7772d50f74
|
@ -234,10 +234,11 @@ func downloadErr(flags downloadFlags) error {
|
|||
clientConfig.SetListenAddr(flags.Addr)
|
||||
}
|
||||
if flags.UploadRate != nil {
|
||||
// TODO: I think the upload rate limit could be much lower.
|
||||
clientConfig.UploadRateLimiter = rate.NewLimiter(rate.Limit(*flags.UploadRate), 256<<10)
|
||||
}
|
||||
if flags.DownloadRate != nil {
|
||||
clientConfig.DownloadRateLimiter = rate.NewLimiter(rate.Limit(*flags.DownloadRate), 1<<20)
|
||||
clientConfig.DownloadRateLimiter = rate.NewLimiter(rate.Limit(*flags.DownloadRate), 1<<16)
|
||||
}
|
||||
if flags.Quiet {
|
||||
clientConfig.Logger = log.Discard
|
||||
|
|
Loading…
Reference in New Issue