From 42e6a7d024dce40587f5a0df96e334018cd07693 Mon Sep 17 00:00:00 2001 From: "roberto@debian32" Date: Tue, 2 Aug 2011 20:36:16 +0200 Subject: [PATCH] wait max 60 seconds for gracefull reload --- uwsgi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uwsgi.c b/uwsgi.c index 3f5863a0..c2238c66 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -511,6 +511,10 @@ void grace_them_all(int signum) { if (uwsgi.reload_mercy > 0) { uwsgi.master_mercy = time(NULL) + uwsgi.reload_mercy; } + else { + // wait max 60 seconds for graceful reload + uwsgi.master_mercy = time(NULL) + 60; + } #ifdef UWSGI_SPOOLER if (uwsgi.spool_dir && uwsgi.shared->spooler_pid > 0) {