r373 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Jul 7 09:48:49 CEST 2006


Author: phk
Date: 2006-07-07 09:48:49 +0200 (Fri, 07 Jul 2006)
New Revision: 373

Modified:
   trunk/varnish-cache/bin/varnishd/cache_acceptor.c
Log:
Set SO_LINGER to zero


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2006-07-07 07:25:38 UTC (rev 372)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c	2006-07-07 07:48:49 UTC (rev 373)
@@ -187,6 +187,7 @@
 	struct sess *sp;
 	char port[NI_MAXSERV];
 	int i;
+	struct linger linger;
 
 	VSL_stats->client_conn++;
 
@@ -212,6 +213,12 @@
 	i = 1;
 	AZ(setsockopt(sp->fd, SOL_SOCKET, SO_NOSIGPIPE, &i, sizeof i));
 #endif
+#ifdef SO_LINGER /* XXX Linux*/
+	linger.l_onoff = 0;
+	linger.l_linger = 0;
+	AZ(setsockopt(sp->fd, SOL_SOCKET, SO_LINGER, &linger, sizeof linger));
+#endif
+
 	i = getnameinfo(addr, l,
 	    sp->addr, VCA_ADDRBUFSIZE,
 	    port, sizeof port, NI_NUMERICHOST | NI_NUMERICSERV);




More information about the varnish-commit mailing list