More descriptive comment in multithreaded example

This commit is contained in:
Sergey Lyubka 2013-12-31 09:06:21 +00:00
parent 4576b69e30
commit 7a77bb1c4a
2 changed files with 2 additions and 3 deletions

View File

@ -27,7 +27,8 @@ int main(void) {
mg_set_option(server1, "listening_port", "8080");
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);
serve(server2);

View File

@ -950,8 +950,6 @@ static void sockaddr_to_string(char *buf, size_t len,
#endif
}
static struct connection *accept_new_connection(struct mg_server *server) {
union socket_address sa;
socklen_t len = sizeof(sa);