From cf247c828a4ef30545458b33cf7db375935cd14b Mon Sep 17 00:00:00 2001 From: "roberto@oneiric64" Date: Wed, 1 Feb 2012 17:53:50 +0100 Subject: [PATCH] fixed emperor reload in lazy mode --- master.c | 2 ++ uwsgi.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/master.c b/master.c index adaeb74c..53a235d9 100644 --- a/master.c +++ b/master.c @@ -984,6 +984,8 @@ int master_loop(char **argv, char **environ) { } // reload me else if (byte == 1) { + // un-lazy the stack to trigger a real reload + uwsgi.lazy = 0; grace_them_all(0); } } diff --git a/uwsgi.c b/uwsgi.c index d30d427b..78024c52 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -3155,6 +3155,11 @@ void uwsgi_opt_true(char *opt, char *value, void *key) { int *ptr = (int *) key; *ptr = 1; + if (value) { + if (!strcasecmp("false", value) || !strcasecmp("off", value) || !strcasecmp("no", value) || !strcmp("0", value)) { + *ptr = 0; + } + } } void uwsgi_opt_set_int(char *opt, char *value, void *key) {