From 17ec600146809804642e6a5e7f8d8a482d6b6f78 Mon Sep 17 00:00:00 2001 From: Unbit Date: Mon, 23 Jun 2014 12:39:58 +0200 Subject: [PATCH] implemented total harakiri --- core/master_checks.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/master_checks.c b/core/master_checks.c index 2d6bab4b..ebf63f8a 100644 --- a/core/master_checks.c +++ b/core/master_checks.c @@ -160,6 +160,12 @@ int uwsgi_master_check_workers_deadline() { int i,j; int ret = 0; for (i = 1; i <= uwsgi.numproc; i++) { + if (uwsgi.workers[i].harakiri_total > 0) { + if (uwsgi.workers[i].harakiri_total < (time_t) uwsgi.current_time) { + trigger_harakiri(i); + ret = 1; + } + } for(j=0;j 0) {