Преглед изворни кода

Use different formula for calculating proxy buffer

tags/v1.0.5^2
9seconds пре 6 година
родитељ
комит
25edb60f2c
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4
    2
      config/config.go

+ 4
- 2
config/config.go Прегледај датотеку

@@ -143,8 +143,10 @@ func (c *Config) adjustProxyValue(value int) int {
143 143
 	}
144 144
 
145 145
 	fvalue := float64(value)
146
-	newValue := fvalue * 1.5 * math.Log2(float64(c.MultiplexPerConnection))
147
-	newValue = math.Max(fvalue, math.Ceil(newValue))
146
+
147
+	newValue := fvalue * 2 * math.Log(float64(c.MultiplexPerConnection))
148
+	newValue = math.Ceil(newValue)
149
+	newValue = math.Max(fvalue, newValue)
148 150
 
149 151
 	return int(newValue)
150 152
 }

Loading…
Откажи
Сачувај