[master] 09b01e7 Count the backend n_conn down when fd's are returned.

Poul-Henning Kamp phk at FreeBSD.org
Wed Jul 8 00:46:24 CEST 2015


commit 09b01e7d747e60d06845cf2ea57cd0b506098f49
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Jul 7 21:44:55 2015 +0000

    Count the backend n_conn down when fd's are returned.

diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index bf7b537..29f22f7 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -165,6 +165,8 @@ vbe_dir_finish(const struct director *d, struct worker *wrk,
 		VSC_C_main->backend_recycle++;
 		VBT_Recycle(wrk, bp->tcp_pool, &vbc);
 	}
+	assert(bp->n_conn > 0);
+	bp->n_conn--;
 #define ACCT(foo)	bp->vsc->foo += bo->acct.foo;
 #include "tbl/acct_fields_bereq.h"
 #undef ACCT



More information about the varnish-commit mailing list