From f2e4eabf42e7071531dddf7525b4fff248d4675e Mon Sep 17 00:00:00 2001 From: Unbit Date: Thu, 26 Dec 2013 08:02:27 +0100 Subject: [PATCH] fixed cheaper busyness check --- plugins/cheaper_busyness/cheaper_busyness.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cheaper_busyness/cheaper_busyness.c b/plugins/cheaper_busyness/cheaper_busyness.c index 86510cf7..9949928b 100644 --- a/plugins/cheaper_busyness/cheaper_busyness.c +++ b/plugins/cheaper_busyness/cheaper_busyness.c @@ -358,7 +358,7 @@ void uwsgi_cheaper_register_busyness(void) { } static int uwsgi_cheaper_busyness_init(void) { - if (uwsgi.requested_cheaper_algo && strcmp(uwsgi.requested_cheaper_algo, "busyness")) return 0; + if (!uwsgi.requested_cheaper_algo || strcmp(uwsgi.requested_cheaper_algo, "busyness")) return 0; // this happens on the first run, the required memory is allocated uwsgi_cheaper_busyness_global.last_values = uwsgi_calloc(sizeof(uint64_t) * uwsgi.numproc); uwsgi_cheaper_busyness_global.was_busy = uwsgi_calloc(sizeof(int) * uwsgi.numproc);