Przeglądaj źródła

Use different formula for calculating proxy buffer

tags/v1.0.5^2
9seconds 6 lat temu
rodzic
commit
25edb60f2c
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4
    2
      config/config.go

+ 4
- 2
config/config.go Wyświetl plik

@@ -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
 }

Ładowanie…
Anuluj
Zapisz