]> err.no Git - varnish/commitdiff
Also accept the undocumented ENOTCONN error return from close(2).
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 23 Nov 2007 10:47:16 +0000 (10:47 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 23 Nov 2007 10:47:16 +0000 (10:47 +0000)
See also http://www.version2.dk/artikel/5153 if you read danish.

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

varnish-cache/bin/varnishd/cache_backend_simple.c

index a105036501753ed09861e3013638146410875931..d2519342b3631d50707027ae68fc05e4652df861 100644 (file)
@@ -281,7 +281,7 @@ bes_ClosedFd(struct worker *w, struct vbe_conn *vc)
        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;