aboutsummaryrefslogtreecommitdiffhomepage
path: root/unix.c
diff options
context:
space:
mode:
authorLee Salzman <[email protected]>2024-05-20 14:06:47 -0400
committerLee Salzman <[email protected]>2024-05-20 14:06:47 -0400
commit80103c873dbda77a03f246822f1d63cfe4da854a (patch)
tree53a7b76a549ede585880b96c077c0de412ac62fb /unix.c
parent4ce1625b8ae22a4e0030f07d80360e25ae558a1e (diff)
downloadenet-80103c873dbda77a03f246822f1d63cfe4da854a.tar.gz
enet-80103c873dbda77a03f246822f1d63cfe4da854a.zip
check for EINTR
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/unix.c b/unix.c
index 6669216..a7bd048 100644
--- a/unix.c
+++ b/unix.c
@@ -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