libwebsocket_service_fd: EAGAIN is harmless, treat like EINTR
Only tested on linux.
Signed-off-by: Alon Levy <alevy@redhat.com>
diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c
index 9b22842..ee393a8 100644
--- a/lib/libwebsockets.c
+++ b/lib/libwebsockets.c
@@ -1993,7 +1993,7 @@
if (eff_buf.token_len < 0) {
fprintf(stderr, "Socket read returned %d\n",
eff_buf.token_len);
- if (errno != EINTR)
+ if (errno != EINTR && errno != EAGAIN)
libwebsocket_close_and_free_session(context,
wsi, LWS_CLOSE_STATUS_NOSTATUS);
return 1;