From 35ce8f2b8da0d682fafc71f446b4dce22d4951b9 Mon Sep 17 00:00:00 2001 From: Unbit Date: Fri, 12 Apr 2013 08:12:15 +0200 Subject: [PATCH] do not spawn the excpetion thread handler if no exception handler has been loaded --- core/exceptions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/exceptions.c b/core/exceptions.c index b67ba8df..84126bae 100644 --- a/core/exceptions.c +++ b/core/exceptions.c @@ -442,7 +442,7 @@ static void uwsgi_exception_handler_thread_loop(struct uwsgi_thread *ut) { int interesting_fd = -1; int ret = event_queue_wait(ut->queue, -1, &interesting_fd); if (ret > 0) { - ssize_t len = read(ut->pipe[1], buf, uwsgi.alarm_msg_size + sizeof(long)); + ssize_t len = read(ut->pipe[1], buf, uwsgi.exception_handler_msg_size + sizeof(long)); if (len > (ssize_t)(sizeof(long) + 1)) { size_t msg_size = len - sizeof(long); char *msg = buf + sizeof(long); @@ -488,7 +488,7 @@ void uwsgi_exception_setup_handlers() { } void uwsgi_exceptions_handler_thread_start() { - + if (!uwsgi.exception_handlers_instance) return; // start the exception_handler_thread uwsgi.exception_handler_thread = uwsgi_thread_new(uwsgi_exception_handler_thread_loop); if (!uwsgi.exception_handler_thread) {