[master] 198dc16ec Fail object delivery little earlier if the session-fd is dead.
Poul-Henning Kamp
phk at FreeBSD.org
Wed Sep 5 07:29:09 UTC 2018
commit 198dc16ec04a34c312f118fe3c2e3602f3aed92a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Sep 5 07:28:13 2018 +0000
Fail object delivery little earlier if the session-fd is dead.
diff --git a/bin/varnishd/http2/cache_http2_deliver.c b/bin/varnishd/http2/cache_http2_deliver.c
index aea59e9a8..912eb88bc 100644
--- a/bin/varnishd/http2/cache_http2_deliver.c
+++ b/bin/varnishd/http2/cache_http2_deliver.c
@@ -84,7 +84,7 @@ h2_bytes(struct req *req, enum vdp_action act, void **priv,
if (act == VDP_INIT)
return (0);
- if (r2->error && act != VDP_FINI)
+ if ((r2->h2sess->error || r2->error) && act != VDP_FINI)
return (-1);
H2_Send_Get(req->wrk, r2->h2sess, r2);
H2_Send(req->wrk, r2,
@@ -189,7 +189,7 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody)
struct sess *sp;
struct h2_req *r2;
struct vsb resp;
- int i, err;
+ int i;
const struct hpack_static *hps;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
@@ -264,9 +264,8 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody)
/* XXX someone into H2 please add appropriate error handling */
if (sendbody) {
- err = VDP_push(req, &h2_vdp, NULL, 1);
- if (!err)
- err = VDP_DeliverObj(req);
+ if (!VDP_push(req, &h2_vdp, NULL, 1))
+ (void)VDP_DeliverObj(req);
}
AZ(req->wrk->v1l);
More information about the varnish-commit
mailing list