mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-08-19 03:57:21 +00:00
initialize alarm and exception thread ONLY in the master
This commit is contained in:
@@ -262,7 +262,9 @@ void uwsgi_alarms_init() {
|
||||
usl = usl->next;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void uwsgi_alarm_thread_start() {
|
||||
// start the alarm_threa
|
||||
uwsgi.alarm_thread = uwsgi_thread_new(uwsgi_alarm_thread_loop);
|
||||
if (!uwsgi.alarm_thread) {
|
||||
|
||||
@@ -458,6 +458,7 @@ static void uwsgi_exception_handler_thread_loop(struct uwsgi_thread *ut) {
|
||||
}
|
||||
}
|
||||
}
|
||||
uwsgi_log("STATUS = %d %d %d %d\n", uwsgi.status.gracefully_reloading, uwsgi.status.brutally_reloading, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,6 +484,9 @@ void uwsgi_exception_setup_handlers() {
|
||||
usl->custom_ptr = uehi;
|
||||
usl = usl->next;
|
||||
}
|
||||
}
|
||||
|
||||
void uwsgi_exceptions_handler_thread_start() {
|
||||
|
||||
// start the exception_handler_thread
|
||||
uwsgi.exception_handler_thread = uwsgi_thread_new(uwsgi_exception_handler_thread_loop);
|
||||
|
||||
@@ -371,6 +371,9 @@ int master_loop(char **argv, char **environ) {
|
||||
|
||||
}
|
||||
|
||||
uwsgi_alarm_thread_start();
|
||||
uwsgi_exceptions_handler_thread_start();
|
||||
|
||||
#ifdef UWSGI_SSL
|
||||
uwsgi_start_legions();
|
||||
#endif
|
||||
|
||||
@@ -3857,6 +3857,9 @@ struct uwsgi_exception_handler *uwsgi_register_exception_handler(char *, int (*)
|
||||
void uwsgi_async_queue_is_full(time_t);
|
||||
char *uwsgi_get_header(struct wsgi_request *, char *, uint16_t, uint16_t *);
|
||||
|
||||
void uwsgi_alarm_thread_start(void);
|
||||
void uwsgi_exceptions_handler_thread_start(void);
|
||||
|
||||
#define uwsgi_response_add_connection_close(x) uwsgi_response_add_header(x, "Connection", 10, "close", 5)
|
||||
#define uwsgi_response_add_content_type(x, y, z) uwsgi_response_add_header(x, "Content-Type", 12, y, z)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user