]> err.no Git - varnish/commitdiff
If we decide not to eliminate the worker thread, properly do so.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 8 Jun 2008 20:42:28 +0000 (20:42 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 8 Jun 2008 20:42:28 +0000 (20:42 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2654 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_pool.c

index 06344c313a5c07f227194a3f55b829f58ef5d84c..a3af22793b43b102b81b0dc9f45cd12ff57ea86e 100644 (file)
@@ -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... */