Commit 347f701e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Set SO_SNDTIMEO to 120 seconds


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@709 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 059f71aa
......@@ -61,6 +61,15 @@ vca_accept_sess(int fd)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment