Commit ec84a148 authored by Sergey Lyubka's avatar Sergey Lyubka

Creating server ctl socket in a loop to protect from interrupt

parent 77d5d4c9
...@@ -3355,7 +3355,7 @@ struct mg_server *mg_create_server(void *server_data) { ...@@ -3355,7 +3355,7 @@ struct mg_server *mg_create_server(void *server_data) {
LINKED_LIST_INIT(&server->active_connections); LINKED_LIST_INIT(&server->active_connections);
LINKED_LIST_INIT(&server->uri_handlers); LINKED_LIST_INIT(&server->uri_handlers);
mg_socketpair(server->ctl); do { mg_socketpair(server->ctl); } while (server->ctl[0] < 0);
server->server_data = server_data; server->server_data = server_data;
server->listening_sock = INVALID_SOCKET; server->listening_sock = INVALID_SOCKET;
set_default_option_values(server->config_options); set_default_option_values(server->config_options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment