From ebe3a203ba7711bb4d24105fd4e24d9edc1873a7 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 22 Apr 2018 17:17:35 +0300 Subject: [PATCH] Always fragment upload data, this fixes some cases when upload must be fragmented, but download test shown no fragmentation requirement --- engine/client/cl_main.c | 3 ++- engine/common/net_ws.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index b30c81f2..692e3c13 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -199,7 +199,7 @@ int CL_GetFragmentSize( void *unused ) if( Netchan_IsLocal( &cls.netchan )) return FRAGMENT_LOCAL_SIZE; - return bound( FRAGMENT_MIN_SIZE, cl_dlmax->value, FRAGMENT_MAX_SIZE ); + return FRAGMENT_MIN_SIZE; } /* @@ -1060,6 +1060,7 @@ void CL_CheckForResend( void ) if( adr.port == 0 ) adr.port = MSG_BigShort( PORT_SERVER ); + Msg( "%i\n", cls.connect_retry ); if( cls.connect_retry == CL_TEST_RETRIES_NORESPONCE ) { // too many fails use default connection method diff --git a/engine/common/net_ws.c b/engine/common/net_ws.c index 9a2dcacf..d862ac75 100644 --- a/engine/common/net_ws.c +++ b/engine/common/net_ws.c @@ -35,7 +35,7 @@ GNU General Public License for more details. #include "netchan.h" #include "mathlib.h" -//#define NET_USE_FRAGMENTS +// #define NET_USE_FRAGMENTS #define PORT_ANY -1 #define MAX_LOOPBACK 4 @@ -1377,7 +1377,7 @@ int NET_SendLong( netsrc_t sock, int net_socket, const char *buf, int len, int f total_sent += size; len -= size; packet_number++; - Sleep( 1 ); + Sys_Sleep( 1 ); } return total_sent;