Explorar o código

lib/connections: Fix rate limiting on arm64 (fixes #3921)

Skip-check: metalint

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3922
Audrius Butkevicius %!s(int64=8) %!d(string=hai) anos
pai
achega
2c4b92d410
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/connections/limiter.go

+ 1 - 1
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))