Mailing List Archive

r2654 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2008-06-08 22:42:28 +0200 (Sun, 08 Jun 2008)
New Revision: 2654

Modified:
trunk/varnish-cache/bin/varnishd/cache_pool.c
Log:
If we decide not to eliminate the worker thread, properly do so.



Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c 2008-06-07 21:19:58 UTC (rev 2653)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2008-06-08 20:42:28 UTC (rev 2654)
@@ -388,6 +388,8 @@
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... */