From: phk Date: Tue, 20 Nov 2007 11:11:17 +0000 (+0000) Subject: When closing a backend connection, we can run into a ECONNRESET which X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=584ba9da66d1b17c194082898019d34acfc55c73;p=varnish When closing a backend connection, we can run into a ECONNRESET which given circumstances is fair game. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2264 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_backend_simple.c b/varnish-cache/bin/varnishd/cache_backend_simple.c index a12b7961..a1050365 100644 --- a/varnish-cache/bin/varnishd/cache_backend_simple.c +++ b/varnish-cache/bin/varnishd/cache_backend_simple.c @@ -274,12 +274,14 @@ bes_GetFd(const struct sess *sp) static void bes_ClosedFd(struct worker *w, struct vbe_conn *vc) { + int i; CHECK_OBJ_NOTNULL(vc, VBE_CONN_MAGIC); CHECK_OBJ_NOTNULL(vc->backend, BACKEND_MAGIC); assert(vc->fd >= 0); WSL(w, SLT_BackendClose, vc->fd, "%s", vc->backend->vcl_name); - AZ(close(vc->fd)); + i = close(vc->fd); + assert(i == 0 || errno == ECONNRESET); vc->fd = -1; VBE_DropRef(vc->backend); vc->backend = NULL;