mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 06:25:59 -07:00
return -2 for EINTR
This commit is contained in:
parent
80103c873d
commit
c30a17ac8a
2 changed files with 6 additions and 4 deletions
4
unix.c
4
unix.c
|
@ -504,8 +504,10 @@ enet_socket_receive (ENetSocket socket,
|
|||
switch (errno)
|
||||
{
|
||||
case EWOULDBLOCK:
|
||||
case EINTR:
|
||||
return 0;
|
||||
case EINTR:
|
||||
case EMSGSIZE:
|
||||
return -2;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
|
6
win32.c
6
win32.c
|
@ -381,14 +381,14 @@ enet_socket_receive (ENetSocket socket,
|
|||
{
|
||||
case WSAEWOULDBLOCK:
|
||||
case WSAECONNRESET:
|
||||
case WSAEINTR:
|
||||
return 0;
|
||||
case WSAEINTR:
|
||||
case WSAEMSGSIZE:
|
||||
return -2;
|
||||
}
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & MSG_PARTIAL)
|
||||
return -2;
|
||||
|
|
Loading…
Reference in a new issue