]> err.no Git - varnish/commitdiff
Don't bail if the client has closed the TCP connection.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 16 Sep 2008 19:00:21 +0000 (19:00 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 16 Sep 2008 19:00:21 +0000 (19:00 +0000)
Fixes #284

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3194 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_vrt.c

index 891106a6c457e355eff17036b929b115a5ab11c5..532c733be52779620f2b8464cf21485d307bfc5c 100644 (file)
@@ -498,7 +498,8 @@ VRT_r_server_ip(struct sess *sp)
 {
 
        if (sp->mysockaddr->sa_family == AF_UNSPEC)
-               AZ(getsockname(sp->fd, sp->mysockaddr, &sp->mysockaddrlen));
+               assert(getsockname(sp->fd, sp->mysockaddr, &sp->mysockaddrlen)
+                   || errno == ECONNRESET);
 
        return (sp->mysockaddr);
 }