fix accept nonzero as close from WRITEABLE callback
authorAndy Green <andy.green@linaro.org>
Sun, 6 Apr 2014 11:40:16 +0000 (12:40 +0100)
committerAndy Green <andy.green@linaro.org>
Sun, 6 Apr 2014 11:40:16 +0000 (12:40 +0100)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/service.c

index 2dbed13..da8f38e 100644 (file)
@@ -349,7 +349,7 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
 
                if ((pollfd->revents & LWS_POLLOUT) &&
                        wsi->state == WSI_STATE_ESTABLISHED &&
-                          lws_handle_POLLOUT_event(context, wsi, pollfd) < 0) {
+                          lws_handle_POLLOUT_event(context, wsi, pollfd)) {
                        lwsl_info("libwebsocket_service_fd: closing\n");
                        goto close_and_handled;
                }