From f012c4423c44fe77b71a69fb04b91532c50054c6 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 5 Dec 2015 21:52:16 +0800 Subject: [PATCH] server socket service close fix fail detect Signed-off-by: Andy Green --- lib/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/service.c b/lib/service.c index fc62c4fa..d39e8bca 100644 --- a/lib/service.c +++ b/lib/service.c @@ -496,7 +496,7 @@ lws_service_fd(struct lws_context *context, struct lws_pollfd *pollfd) case LWS_CONNMODE_SERVER_LISTENER: case LWS_CONNMODE_SSL_ACK_PENDING: n = lws_server_socket_service(context, wsi, pollfd); - if (n < 0) + if (n) goto close_and_handled; pending = lws_ssl_pending(wsi); if (pending)