Commit 2559962c authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r4384: Don't panic in TCP_linger() if the other end closed on us.

    
Fixes #547



git-svn-id: http://www.varnish-cache.org/svn/branches/2.0@4408 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent e8ea3733
......@@ -239,8 +239,10 @@ void
TCP_linger(int sock, int linger)
{
struct linger lin;
int i;
memset(&lin, 0, sizeof lin);
lin.l_onoff = linger;
AZ(setsockopt(sock, SOL_SOCKET, SO_LINGER, &lin, sizeof lin));
i = setsockopt(sock, SOL_SOCKET, SO_LINGER, &lin, sizeof lin);
assert(i == 0 || errno == EBADF);
}
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