mirror of
https://github.com/lxsang/ant-http
synced 2024-11-17 17:08:20 +01:00
fix socket close
This commit is contained in:
parent
d39832b981
commit
0733bec252
2
httpd.c
2
httpd.c
@ -225,6 +225,7 @@ int main(int argc, char* argv[])
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* accept_request(client_sock); */
|
/* accept_request(client_sock); */
|
||||||
|
client->sock = client_sock;
|
||||||
server_config.connection++;
|
server_config.connection++;
|
||||||
//LOG("Unclosed connection: %d\n", server_config.connection);
|
//LOG("Unclosed connection: %d\n", server_config.connection);
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
@ -241,7 +242,6 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
client->sock = client_sock;
|
|
||||||
if (pthread_create(&newthread , NULL,(void *(*)(void *))accept_request, (void *)client) != 0)
|
if (pthread_create(&newthread , NULL,(void *(*)(void *))accept_request, (void *)client) != 0)
|
||||||
{
|
{
|
||||||
perror("pthread_create");
|
perror("pthread_create");
|
||||||
|
Loading…
Reference in New Issue
Block a user