diff options
author | Lee Salzman <[email protected]> | 2024-05-20 14:19:30 -0400 |
---|---|---|
committer | Lee Salzman <[email protected]> | 2024-05-20 14:19:30 -0400 |
commit | c30a17ac8a512de505357199776ddfaa50d0c6e4 (patch) | |
tree | 716a3208f2620afe329c9786f7a63f89dba52287 | |
parent | 80103c873dbda77a03f246822f1d63cfe4da854a (diff) | |
download | enet-c30a17ac8a512de505357199776ddfaa50d0c6e4.tar.gz enet-c30a17ac8a512de505357199776ddfaa50d0c6e4.zip |
return -2 for EINTR
-rw-r--r-- | unix.c | 4 | ||||
-rw-r--r-- | win32.c | 6 |
2 files changed, 6 insertions, 4 deletions
@@ -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; } @@ -381,13 +381,13 @@ enet_socket_receive (ENetSocket socket, { case WSAEWOULDBLOCK: case WSAECONNRESET: - case WSAEINTR: return 0; + case WSAEINTR: case WSAEMSGSIZE: return -2; + default: + return -1; } - - return -1; } if (flags & MSG_PARTIAL) |