r161 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Mon May 1 14:27:30 CEST 2006
Author: phk
Date: 2006-05-01 14:27:30 +0200 (Mon, 01 May 2006)
New Revision: 161
Modified:
trunk/varnish-cache/bin/varnishd/cache_backend.c
Log:
Keep track of how many connections we have open
Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-05-01 12:27:10 UTC (rev 160)
+++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-05-01 12:27:30 UTC (rev 161)
@@ -133,6 +133,7 @@
AZ(pthread_mutex_lock(&vbemtx));
TAILQ_REMOVE(&vc->vbe->bconn, vc, list);
if (vc->fd < 0) {
+ vc->vbe->nconn--;
free(vc);
} else {
vc->inuse = 0;
@@ -236,6 +237,7 @@
vc->fd = -1;
vc->inuse = 1;
TAILQ_INSERT_TAIL(&vp->bconn, vc, list);
+ vp->nconn++;
AZ(pthread_mutex_unlock(&vbemtx));
connect_to_backend(vc, bp);
event_set(&vc->ev, vc->fd, EV_READ | EV_PERSIST, vbe_rdf, vc);
More information about the varnish-commit
mailing list