From 50ef8d8d9e5ee2beb38f003bfdceb19d1a9db091 Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 23 Feb 2008 19:15:23 +0000 Subject: [PATCH] Dispose of VCL reference count if we drop parked sessions due to worker pool shortages. Fixes ticket #213 git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2529 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_pool.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index 2a14bd0a..8ad13e65 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -316,6 +316,13 @@ WRK_QueueSession(struct sess *sp) UNLOCK(&tmtx); sp->t_end = TIM_real(); vca_close_session(sp, "dropped"); + if(sp->vcl != NULL) { + /* + * A session parked on a busy object can come here + * after it wakes up. Loose the VCL reference. + */ + VCL_Rel(&sp->vcl); + } SES_Delete(sp); return; } -- 2.39.5