From: phk Date: Tue, 16 Sep 2008 19:00:21 +0000 (+0000) Subject: Don't bail if the client has closed the TCP connection. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccd17a0a8e34b2c103560e912cfe234461472cd2;p=varnish Don't bail if the client has closed the TCP connection. Fixes #284 git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3194 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_vrt.c b/varnish-cache/bin/varnishd/cache_vrt.c index 891106a6..532c733b 100644 --- a/varnish-cache/bin/varnishd/cache_vrt.c +++ b/varnish-cache/bin/varnishd/cache_vrt.c @@ -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); }