瀏覽代碼

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

Skip-check: metalint

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3922
Audrius Butkevicius 8 年之前
父節點
當前提交
2c4b92d410
共有 1 個文件被更改,包括 1 次插入1 次删除
  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))