From 3367e0fa984b3e5f61b2f75f07fc4e11f824bb73 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 20 Apr 2013 13:16:37 +0200 Subject: [PATCH] THREADS: config setting min_workers _now_ also is that, plus its also max_spare_workers --- citadel/sysdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 4ea07f3ed..01e7e831d 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -1381,7 +1381,8 @@ SKIP_SELECT: pthread_mutex_lock(&ThreadCountMutex); --active_workers; - if (active_workers + config.c_min_workers < num_workers) + if ((active_workers + config.c_min_workers < num_workers) && + (num_workers > config.c_min_workers)) { num_workers--; pthread_mutex_unlock(&ThreadCountMutex); -- 2.30.2