engine: net_http: don't consider EISCONN an error, just proceed to next step
This commit is contained in:
parent
399d549d0c
commit
30db748dcb
1 changed files with 14 additions and 5 deletions
|
@ -300,16 +300,25 @@ static int HTTP_FileConnect( httpfile_t *file )
|
||||||
if( res < 0 )
|
if( res < 0 )
|
||||||
{
|
{
|
||||||
int err = WSAGetLastError();
|
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( ));
|
Con_Printf( S_ERROR "cannot connect to server: %s\n", NET_ErrorString( ));
|
||||||
HTTP_FreeFile( file, true );
|
HTTP_FreeFile( file, true );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
file->blocktime += host.frametime;
|
|
||||||
file->blockreason = "request send";
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file->blocktime = 0;
|
file->blocktime = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue