mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-19 07:51:43 +00:00
Fix crash when trying to send to an unreachable client
This commit is contained in:
parent
d6bb89fbb2
commit
e1562ad4c5
1 changed files with 5 additions and 1 deletions
|
@ -83,6 +83,10 @@
|
|||
#undef ETIMEDOUT
|
||||
#endif
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#ifdef EHOSTUNREACH
|
||||
#undef EHOSTUNREACH
|
||||
#endif
|
||||
#define EHOSTUNREACH WSAEHOSTUNREACH
|
||||
#ifndef IOC_VENDOR
|
||||
#define IOC_VENDOR 0x18000000
|
||||
#endif
|
||||
|
@ -678,7 +682,7 @@ static void SOCK_Send(void)
|
|||
if (c == ERRSOCKET)
|
||||
{
|
||||
int e = errno; // save error code so it can't be modified later
|
||||
if (e != ECONNREFUSED && e != EWOULDBLOCK)
|
||||
if (e != ECONNREFUSED && e != EWOULDBLOCK && e != EHOSTUNREACH)
|
||||
I_Error("SOCK_Send, error sending to node %d (%s) #%u: %s", doomcom->remotenode,
|
||||
SOCK_GetNodeAddress(doomcom->remotenode), e, strerror(e));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue