THREADS: config setting min_workers _now_ also is that, plus its also max_spare_workers
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 20 Apr 2013 11:16:37 +0000 (13:16 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 20 Apr 2013 11:16:37 +0000 (13:16 +0200)
citadel/sysdep.c

index 4ea07f3edcd95ffc34802439689098d83d7245c8..01e7e831d49ddcd5de11b260bac2e02e29c60acd 100644 (file)
@@ -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);