From 512c246338f38f093712943cee6701ff42fab68f Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 18 Sep 2013 12:59:33 +0800 Subject: [PATCH] trac #39: allow fd 0 for connection Reported (with fix) by Martijn The http://libwebsockets.org/trac/ticket/39 Signed-off-by: Andy Green --- lib/libwebsockets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 661876ed..49ae8e0e 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -113,7 +113,7 @@ insert_wsi_socket_into_fds(struct libwebsocket_context *context, } assert(wsi); - assert(wsi->sock); + assert(wsi->sock >= 0); lwsl_info("insert_wsi_socket_into_fds: wsi=%p, sock=%d, fds pos=%d\n", wsi, wsi->sock, context->fds_count);