]> err.no Git - varnish/commitdiff
Fix logic bug so we don't reap worker threads all the time.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 17 Sep 2006 09:26:24 +0000 (09:26 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 17 Sep 2006 09:26:24 +0000 (09:26 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1048 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_pool.c

index 82c91453d9e89a3222290b5c3a72ffff21bad086..04a815a152194c13e46bb90ba58798c8413a9f52 100644 (file)
@@ -339,7 +339,7 @@ wrk_reaperthread(void *priv)
                        w = TAILQ_LAST(&qp->idle, workerhead);
                        if (w != NULL &&
                           (w->idle + params->wthread_timeout < now ||
-                           VSL_stats->n_wrk <= params->wthread_max))
+                           VSL_stats->n_wrk > params->wthread_max))
                                TAILQ_REMOVE(&qp->idle, w, list);
                        else 
                                w = NULL;