r2285 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Nov 23 11:47:17 CET 2007


Author: phk
Date: 2007-11-23 11:47:16 +0100 (Fri, 23 Nov 2007)
New Revision: 2285

Modified:
   trunk/varnish-cache/bin/varnishd/cache_backend_simple.c
Log:
Also accept the undocumented ENOTCONN error return from close(2).

See also http://www.version2.dk/artikel/5153 if you read danish.



Modified: trunk/varnish-cache/bin/varnishd/cache_backend_simple.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend_simple.c	2007-11-23 10:18:46 UTC (rev 2284)
+++ trunk/varnish-cache/bin/varnishd/cache_backend_simple.c	2007-11-23 10:47:16 UTC (rev 2285)
@@ -281,7 +281,7 @@
 	assert(vc->fd >= 0);
 	WSL(w, SLT_BackendClose, vc->fd, "%s", vc->backend->vcl_name);
 	i = close(vc->fd);
-	assert(i == 0 || errno == ECONNRESET);
+	assert(i == 0 || errno == ECONNRESET || errno == ENOTCONN);
 	vc->fd = -1;
 	VBE_DropRef(vc->backend);
 	vc->backend = NULL;




More information about the varnish-commit mailing list