Mailing List Archive

r2529 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2008-02-23 20:15:23 +0100 (Sat, 23 Feb 2008)
New Revision: 2529

Modified:
trunk/varnish-cache/bin/varnishd/cache_pool.c
Log:
Dispose of VCL reference count if we drop parked sessions due to worker
pool shortages.

Fixes ticket #213


Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c 2008-02-21 21:14:57 UTC (rev 2528)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2008-02-23 19:15:23 UTC (rev 2529)
@@ -316,6 +316,13 @@
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;
}