#define CLEANUP_EVERY_EVENTS 100
void *socket_listen_main_multi_threaded(void *ptr) {
- (void)ptr;
+ struct netdata_static_thread *static_thread = (struct netdata_static_thread *)ptr;
web_server_mode = WEB_SERVER_MODE_MULTI_THREADED;
info("Multi-threaded WEB SERVER thread created with task id %d", gettid());
debug(D_WEB_CLIENT, "LISTENER: exit!");
close_listen_sockets();
+ freez(fds);
+
+ static_thread->enabled = 0;
+ pthread_exit(NULL);
return NULL;
}
}
void *socket_listen_main_single_threaded(void *ptr) {
- (void)ptr;
+ struct netdata_static_thread *static_thread = (struct netdata_static_thread *)ptr;
web_server_mode = WEB_SERVER_MODE_SINGLE_THREADED;
if (w->mode != WEB_CLIENT_MODE_FILECOPY) {
debug(D_WEB_CLIENT, "%llu: Processing received data.", w->id);
- web_client_process(w);
+ web_client_process_request(w);
}
}
debug(D_WEB_CLIENT, "LISTENER: exit!");
close_listen_sockets();
+
+ static_thread->enabled = 0;
+ pthread_exit(NULL);
return NULL;
}