From 5f0880d4a2f2b8d5e81086570f4c58076ed06654 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 2 Mar 2025 00:06:37 +0300 Subject: [PATCH] engine: client: lower the bandwidth test fragment sizes to 1400 and less, as using 64k, 32k and more is unreliable --- engine/client/cl_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 424711e6..ffcbbde6 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -1183,7 +1183,11 @@ Returns bandwidth test fragment size */ static int CL_GetTestFragmentSize( void ) { - const int fragmentSizes[CL_TEST_RETRIES] = { 64000, 32000, 10666, 5200, 1400 }; + // const int fragmentSizes[CL_TEST_RETRIES] = { 64000, 32000, 10666, 5200, 1400 }; + + // it turns out, even if we pass the bandwidth test, it doesn't mean we can use such large fragments + // as a temporary solution, use smaller fragment sizes + const int fragmentSizes[CL_TEST_RETRIES] = { 1400, 1200, 1000, 800, 508 }; if( cls.connect_retry >= 0 && cls.connect_retry < CL_TEST_RETRIES ) return bound( FRAGMENT_MIN_SIZE, fragmentSizes[cls.connect_retry], FRAGMENT_MAX_SIZE ); else