From: phk Date: Sun, 8 Jun 2008 20:42:28 +0000 (+0000) Subject: If we decide not to eliminate the worker thread, properly do so. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f663a7928f4a604891148ca28853395f067a679;p=varnish 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 --- 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... */