[4.1] 6e386ef Set socket non-blocking before closing, if we are load-shedding it.
Lasse Karstensen
lkarsten at varnish-software.com
Thu Feb 11 17:14:33 CET 2016
commit 6e386ef64ce7f3e985ddaaaa962ef732bc0855cd
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Feb 8 20:29:09 2016 +0000
Set socket non-blocking before closing, if we are load-shedding it.
diff --git a/bin/varnishd/cache/cache_acceptor.c b/bin/varnishd/cache/cache_acceptor.c
index 4fa62eb..5376203 100644
--- a/bin/varnishd/cache/cache_acceptor.c
+++ b/bin/varnishd/cache/cache_acceptor.c
@@ -313,9 +313,10 @@ vca_make_session(struct worker *wrk, void *arg)
* connection with minimum effort and fuzz, rather than try
* to send an intelligent message back.
*/
+ vca_pace_bad();
+ (void)VTCP_nonblocking(wa->acceptsock);
AZ(close(wa->acceptsock));
wrk->stats->sess_drop++;
- vca_pace_bad();
WS_Release(wrk->aws, 0);
return;
}
More information about the varnish-commit
mailing list