From: phk Date: Sat, 23 Feb 2008 19:15:23 +0000 (+0000) Subject: Dispose of VCL reference count if we drop parked sessions due to worker X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50ef8d8d9e5ee2beb38f003bfdceb19d1a9db091;p=varnish 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 --- 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; }