diff options
author | Lee Salzman <[email protected]> | 2024-05-20 14:06:47 -0400 |
---|---|---|
committer | Lee Salzman <[email protected]> | 2024-05-20 14:06:47 -0400 |
commit | 80103c873dbda77a03f246822f1d63cfe4da854a (patch) | |
tree | 53a7b76a549ede585880b96c077c0de412ac62fb | |
parent | 4ce1625b8ae22a4e0030f07d80360e25ae558a1e (diff) | |
download | enet-80103c873dbda77a03f246822f1d63cfe4da854a.tar.gz enet-80103c873dbda77a03f246822f1d63cfe4da854a.zip |
check for EINTR
-rw-r--r-- | unix.c | 12 | ||||
-rw-r--r-- | win32.c | 1 |
2 files changed, 9 insertions, 4 deletions
@@ -501,10 +501,14 @@ enet_socket_receive (ENetSocket socket, if (recvLength == -1) { - if (errno == EWOULDBLOCK) - return 0; - - return -1; + switch (errno) + { + case EWOULDBLOCK: + case EINTR: + return 0; + default: + return -1; + } } #ifdef HAS_MSGHDR_FLAGS @@ -381,6 +381,7 @@ enet_socket_receive (ENetSocket socket, { case WSAEWOULDBLOCK: case WSAECONNRESET: + case WSAEINTR: return 0; case WSAEMSGSIZE: return -2; |