r2654 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Sun Jun 8 22:42:29 CEST 2008


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... */




More information about the varnish-commit mailing list