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)
|
switch (errno)
|
||||||
{
|
{
|
||||||
case EWOULDBLOCK:
|
case EWOULDBLOCK:
|
||||||
case EINTR:
|
|
||||||
return 0;
|
return 0;
|
||||||
|
case EINTR:
|
||||||
|
case EMSGSIZE:
|
||||||
|
return -2;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
6
win32.c
6
win32.c
|
@ -381,13 +381,13 @@ enet_socket_receive (ENetSocket socket,
|
||||||
{
|
{
|
||||||
case WSAEWOULDBLOCK:
|
case WSAEWOULDBLOCK:
|
||||||
case WSAECONNRESET:
|
case WSAECONNRESET:
|
||||||
case WSAEINTR:
|
|
||||||
return 0;
|
return 0;
|
||||||
|
case WSAEINTR:
|
||||||
case WSAEMSGSIZE:
|
case WSAEMSGSIZE:
|
||||||
return -2;
|
return -2;
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & MSG_PARTIAL)
|
if (flags & MSG_PARTIAL)
|
||||||
|
|
Loading…
Reference in a new issue