Commit 7a77bb1c authored by Sergey Lyubka's avatar Sergey Lyubka

More descriptive comment in multithreaded example

parent 4576b69e
...@@ -27,7 +27,8 @@ int main(void) { ...@@ -27,7 +27,8 @@ int main(void) {
mg_set_option(server1, "listening_port", "8080"); mg_set_option(server1, "listening_port", "8080");
mg_set_listening_socket(server2, mg_get_listening_socket(server1)); mg_set_listening_socket(server2, mg_get_listening_socket(server1));
// server1 goes to separate thread, server 2 runs in main thread // server1 goes to separate thread, server 2 runs in main thread.
// IMPORTANT: NEVER LET DIFFERENT THREADS HANDLE THE SAME SERVER.
mg_start_thread(serve, server1); mg_start_thread(serve, server1);
serve(server2); serve(server2);
......
...@@ -950,8 +950,6 @@ static void sockaddr_to_string(char *buf, size_t len, ...@@ -950,8 +950,6 @@ static void sockaddr_to_string(char *buf, size_t len,
#endif #endif
} }
static struct connection *accept_new_connection(struct mg_server *server) { static struct connection *accept_new_connection(struct mg_server *server) {
union socket_address sa; union socket_address sa;
socklen_t len = sizeof(sa); socklen_t len = sizeof(sa);
......
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