This commit is contained in:
Alex Sharov 2022-08-11 21:37:14 +07:00 committed by GitHub
parent a7d07ad04d
commit 206f41811d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,6 @@ func New(snapDir string, verbosity lg.Level, dbg bool, natif nat.Interface, down
}
}
// rates are divided by 2 - I don't know why it works, maybe bug inside torrent lib accounting
log.Warn("alex", "a", rate.Limit(uploadRate.Bytes()), "b", 2*DefaultNetworkChunkSize)
torrentConfig.UploadRateLimiter = rate.NewLimiter(rate.Limit(uploadRate.Bytes()), 2*DefaultNetworkChunkSize) // default: unlimited
if downloadRate.Bytes() < 500_000_000 {
b := int(2 * DefaultNetworkChunkSize)