summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-10-19 11:21:57 +0200
committerAndy Green <andy.green@linaro.org>2012-10-19 18:27:40 +0800
commitdc93b7f2e78e055430766c19934dc92fbce0707c (patch)
tree4e18c70c4d28c39cbf05e4938fbee0f846e67348
parent0291eb3b958aa21cb9b75b74139ded93bd764e84 (diff)
libwebsocket_service_fd: EAGAIN is harmless, treat like EINTR
Only tested on linux. Signed-off-by: Alon Levy <alevy@redhat.com>
-rw-r--r--lib/libwebsockets.c2
1 files changed, 1 insertions, 1 deletions
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 @@ bail3:
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;