From 8b2d6f0ee7d39a62b0089e8b1b5a923e7c9c22dc Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 22 Oct 2013 06:49:30 +0800 Subject: [PATCH] use compatible_close for sockets Signed-off-by: Andy Green --- lib/libwebsockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 7e7a7b22..b759b397 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -2174,7 +2174,7 @@ libwebsocket_create_context(struct lws_context_creation_info *info) if (n < 0) { lwsl_err("ERROR on binding to port %d (%d %d)\n", info->port, n, errno); - close(sockfd); + compatible_close(sockfd); goto bail; } @@ -2182,7 +2182,7 @@ libwebsocket_create_context(struct lws_context_creation_info *info) sizeof(struct libwebsocket)); if (wsi == NULL) { lwsl_err("Out of mem\n"); - close(sockfd); + compatible_close(sockfd); goto bail; } memset(wsi, 0, sizeof(struct libwebsocket));