Use different formula for calculating proxy buffer

This commit is contained in:
9seconds
2020-03-31 09:45:59 +03:00
parent b5a8d8b804
commit 25edb60f2c
+4 -2
View File
@@ -143,8 +143,10 @@ func (c *Config) adjustProxyValue(value int) int {
} }
fvalue := float64(value) fvalue := float64(value)
newValue := fvalue * 1.5 * math.Log2(float64(c.MultiplexPerConnection))
newValue = math.Max(fvalue, math.Ceil(newValue)) newValue := fvalue * 2 * math.Log(float64(c.MultiplexPerConnection))
newValue = math.Ceil(newValue)
newValue = math.Max(fvalue, newValue)
return int(newValue) return int(newValue)
} }