From 25edb60f2c59334906eb061c0832132331d4d58c Mon Sep 17 00:00:00 2001 From: 9seconds Date: Tue, 31 Mar 2020 09:45:59 +0300 Subject: [PATCH] Use different formula for calculating proxy buffer --- config/config.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index aa13937..68fc717 100644 --- a/config/config.go +++ b/config/config.go @@ -143,8 +143,10 @@ func (c *Config) adjustProxyValue(value int) int { } 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) }