From 450f2040b2022633e56783cc1c9f1a5d0966b65a Mon Sep 17 00:00:00 2001 From: ckolivas Date: Fri, 16 Jan 2015 20:33:52 +1100 Subject: [PATCH] Only iterate over workers in workerstats if some are left in the worker_instances list --- src/stratifier.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index c04aa3f3..b669e235 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -3517,6 +3517,9 @@ static void *statsupdate(void *arg) worker_instance_t *worker; bool idle = false; + if (instance->workers < 1) + continue; + /* Decay times per worker */ DL_FOREACH(instance->worker_instances, worker) { per_tdiff = tvdiff(&now, &worker->last_share);