From 0f663a7928f4a604891148ca28853395f067a679 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 8 Jun 2008 20:42:28 +0000 Subject: [PATCH] If we decide not to eliminate the worker thread, properly do so. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2654 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_pool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index 06344c31..a3af2279 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -388,6 +388,8 @@ wrk_decimate_flock(struct wq *qp, double t_idle) w = VTAILQ_LAST(&qp->idle, workerhead); if (w != NULL && (w->used < t_idle || qp->nthr > nthr_max)) VTAILQ_REMOVE(&qp->idle, w, list); + else + w = NULL; UNLOCK(&qp->mtx); /* And give it a kiss on the cheek... */ -- 2.39.5