r709 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Mon Aug 7 11:21:55 CEST 2006
Author: phk
Date: 2006-08-07 11:21:54 +0200 (Mon, 07 Aug 2006)
New Revision: 709
Modified:
trunk/varnish-cache/bin/varnishd/cache_acceptor.c
Log:
Set SO_SNDTIMEO to 120 seconds
Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-08-07 08:42:58 UTC (rev 708)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-08-07 09:21:54 UTC (rev 709)
@@ -61,7 +61,16 @@
linger.l_linger = 0;
AZ(setsockopt(sp->fd, SOL_SOCKET, SO_LINGER, &linger, sizeof linger));
#endif
+#ifdef SO_SNDTIMEO
+ {
+ struct timeval tv;
+ tv.tv_sec = 120;
+ tv.tv_usec = 0;
+ AZ(setsockopt(sp->fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof tv));
+ }
+#endif
+
TCP_name(addr, l, sp->addr, sizeof sp->addr, sp->port, sizeof sp->port);
VSL(SLT_SessionOpen, sp->fd, "%s %s", sp->addr, sp->port);
return (sp);
More information about the varnish-commit
mailing list