From ccd17a0a8e34b2c103560e912cfe234461472cd2 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 16 Sep 2008 19:00:21 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/cache_vrt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.39.5