[master] 0828ff5 Try to work around the epoll waiters weird policy of keeping listening.
Poul-Henning Kamp
phk at FreeBSD.org
Fri Jan 23 10:15:25 CET 2015
commit 0828ff5e54e73dfe59d882fbe9ff1cc5364e16f7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Jan 23 09:14:59 2015 +0000
Try to work around the epoll waiters weird policy of keeping listening.
diff --git a/bin/varnishd/cache/cache_backend_tcp.c b/bin/varnishd/cache/cache_backend_tcp.c
index 23ada15..a622193 100644
--- a/bin/varnishd/cache/cache_backend_tcp.c
+++ b/bin/varnishd/cache/cache_backend_tcp.c
@@ -286,7 +286,6 @@ VSL(SLT_Debug, 0, "------> Recycle fd %d in_w %d", vbc->fd, vbc->in_waiter);
case VBC_W_NEW:
case VBC_W_NOWAIT:
vbc->in_waiter = VBC_W_INWAIT;
- INIT_OBJ(vbc->waited, WAITED_MAGIC);
vbc->waited->ptr = vbc;
vbc->waited->fd = vbc->fd;
vbc->waited->idle = VTIM_real();
@@ -419,6 +418,7 @@ VBT_Get(struct tcp_pool *tp, double tmo)
ALLOC_OBJ(vbc, VBC_MAGIC);
AN(vbc);
+ INIT_OBJ(vbc->waited, WAITED_MAGIC);
vbc->in_waiter = VBC_W_NEW;
if (vbc != NULL) {
vbc->fd = VBT_Open(tp, tmo, &vbc->addr);
More information about the varnish-commit
mailing list