From 0733bec25230899fb43dd104146fde8d56160c21 Mon Sep 17 00:00:00 2001 From: Xuan Sang LE Date: Thu, 8 Mar 2018 12:38:53 +0100 Subject: [PATCH] fix socket close --- httpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpd.c b/httpd.c index c7d4d45..d3c9c88 100644 --- a/httpd.c +++ b/httpd.c @@ -225,6 +225,7 @@ int main(int argc, char* argv[]) continue; } /* accept_request(client_sock); */ + client->sock = client_sock; server_config.connection++; //LOG("Unclosed connection: %d\n", server_config.connection); #ifdef USE_OPENSSL @@ -241,7 +242,6 @@ int main(int argc, char* argv[]) } } #endif - client->sock = client_sock; if (pthread_create(&newthread , NULL,(void *(*)(void *))accept_request, (void *)client) != 0) { perror("pthread_create");