From 2c4b92d410d33f848e46d2b7373f7aa1222ea1db Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Mon, 23 Jan 2017 20:55:00 +0000 Subject: [PATCH] lib/connections: Fix rate limiting on arm64 (fixes #3921) Skip-check: metalint GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3922 --- lib/connections/limiter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connections/limiter.go b/lib/connections/limiter.go index f2a50eeee..c760936b2 100644 --- a/lib/connections/limiter.go +++ b/lib/connections/limiter.go @@ -65,7 +65,7 @@ func (lim *limiter) CommitConfiguration(from, to config.Configuration) bool { lim.read.SetLimit(1024 * rate.Limit(to.Options.MaxRecvKbps)) } - if to.Options.MaxSendKbps < 0 { + if to.Options.MaxSendKbps <= 0 { lim.write.SetLimit(rate.Inf) } else { lim.write.SetLimit(1024 * rate.Limit(to.Options.MaxSendKbps))