---

 bin/varnishd/cache/cache_pool.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c
index 4e7bd7c..c19c1fe 100644
--- a/bin/varnishd/cache/cache_pool.c
+++ b/bin/varnishd/cache/cache_pool.c
@@ -364,6 +364,16 @@ pool_herder(void *priv)
                        continue;
                }
 
+               Lck_Lock(&pp->mtx);
+               VTAILQ_FOREACH_REVERSE(pt, &pp->idle_queue, taskhead, list) {
+                       CAST_OBJ_NOTNULL(wrk, pt->priv, WORKER_MAGIC);
+                       if (wrk->lastused > t_idle)
+                               break;
+                       if (wrk->vcl != NULL)
+                               VCL_Rel(&wrk->vcl);
+               }
+               Lck_Unlock(&pp->mtx);
+
                if (pp->nthr > cache_param->wthread_min) {
 
                        t_idle = VTIM_real() - cache_param->wthread_timeout;
-- 
1.7.10.4


_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to