From a034e2f8bd9f8eecd53d160279f373208c5e0559 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 19 Jul 2006 19:45:14 +0000 Subject: [PATCH] Don't bother determining if we should close if we already have done so. Also: we may not have valid headers if cache_http.c threw a 400. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@502 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_center.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 4829c26b..b19a4f78 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -85,7 +85,9 @@ cnt_done(struct sess *sp) char *b; assert(sp->obj == NULL); - if (http_GetHdr(sp->http, "Connection", &b) && + if (sp->fd < 0) { + /* Allready closed */ + } else if (http_GetHdr(sp->http, "Connection", &b) && !strcmp(b, "close")) { vca_close_session(sp, "Connection header"); } else if (strcmp(sp->http->proto, "HTTP/1.1")) { -- 2.39.5