summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2012-10-07 20:40:35 +0800
committerAndy Green <andy.green@linaro.org>2012-10-07 20:40:35 +0800
commitfa3f405d1db5a192dae4bdff7759fde3069a7d64 (patch)
treec985da6adc6b4a06da2541c0bae9ebcde6f59852
parent94c62c652cd726332a9e67e0538b436e8b4705a8 (diff)
stop being so fragile on socket lifecycle
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r--lib/libwebsockets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c
index 03147e1..2f5b4d0 100644
--- a/lib/libwebsockets.c
+++ b/lib/libwebsockets.c
@@ -1508,7 +1508,7 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
wsi = wsi_from_fd(context, pollfd->fd);
if (wsi == NULL)
- return 1;
+ return 0;
switch (wsi->mode) {
case LWS_CONNMODE_SERVER_LISTENER:
@@ -2001,7 +2001,7 @@ bail3:
if (!eff_buf.token_len) {
libwebsocket_close_and_free_session(context, wsi,
LWS_CLOSE_STATUS_NOSTATUS);
- return 1;
+ return 0;
}
/*