]> err.no Git - varnish/commitdiff
Dispose of VCL reference count if we drop parked sessions due to worker
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 23 Feb 2008 19:15:23 +0000 (19:15 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 23 Feb 2008 19:15:23 +0000 (19:15 +0000)
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

index 2a14bd0a3041e31e073f9d20a7064554d707bcf2..8ad13e65ba99b2adcf614504961166da97473462 100644 (file)
@@ -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;
        }