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 /unix.c | |
parent | 4ce1625b8ae22a4e0030f07d80360e25ae558a1e (diff) | |
download | enet-80103c873dbda77a03f246822f1d63cfe4da854a.tar.gz enet-80103c873dbda77a03f246822f1d63cfe4da854a.zip |
check for EINTR
Diffstat (limited to 'unix.c')
-rw-r--r-- | unix.c | 12 |
1 files changed, 8 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 |