]> err.no Git - varnish/commitdiff
Don't bother determining if we should close if we already have done so.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 19 Jul 2006 19:45:14 +0000 (19:45 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 19 Jul 2006 19:45:14 +0000 (19:45 +0000)
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

index 4829c26b0b2cd984864f24dc48fb8c2ba6e489be..b19a4f78ed4cf872ae99970158246d8ff8c2785f 100644 (file)
@@ -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")) {