From 584ba9da66d1b17c194082898019d34acfc55c73 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 20 Nov 2007 11:11:17 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/cache_backend_simple.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.5