2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

engine: net_http: don't consider EISCONN an error, just proceed to next step

This commit is contained in:
Alibek Omarov 2024-11-17 03:13:03 +03:00
parent 399d549d0c
commit 30db748dcb

View File

@ -300,16 +300,25 @@ static int HTTP_FileConnect( httpfile_t *file )
if( res < 0 )
{
int err = WSAGetLastError();
if( err != WSAEWOULDBLOCK && err != WSAEINPROGRESS && err != WSAEALREADY )
switch( err )
{
case WSAEISCONN:
// we're connected, proceed
break;
case WSAEWOULDBLOCK:
case WSAEINPROGRESS:
case WSAEALREADY:
// add to the timeout
file->blocktime += host.frametime;
file->blockreason = "request send";
return 0;
default:
// error, exit
Con_Printf( S_ERROR "cannot connect to server: %s\n", NET_ErrorString( ));
HTTP_FreeFile( file, true );
return 0;
}
file->blocktime += host.frametime;
file->blockreason = "request send";
return 0;
}
file->blocktime = 0;