r3194 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Tue Sep 16 21:00:21 CEST 2008


Author: phk
Date: 2008-09-16 21:00:21 +0200 (Tue, 16 Sep 2008)
New Revision: 3194

Modified:
   trunk/varnish-cache/bin/varnishd/cache_vrt.c
Log:
Don't bail if the client has closed the TCP connection.

Fixes #284



Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c	2008-09-16 18:56:10 UTC (rev 3193)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c	2008-09-16 19:00:21 UTC (rev 3194)
@@ -498,7 +498,8 @@
 {
 
 	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);
 }




More information about the varnish-commit mailing list