Просмотр исходного кода

Use different formula for calculating proxy buffer

tags/v1.0.5^2
9seconds 6 лет назад
Родитель
Сommit
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
 }

Загрузка…
Отмена
Сохранить