[master] 28ab2b8 Assert that an h2 stream is not scheduled on cleanup

Dag Haavi Finstad daghf at varnish-software.com
Fri Nov 10 13:26:07 UTC 2017


commit 28ab2b8ef307c3620883fce446802b0c34c02f3e
Author: Dag Haavi Finstad <daghf at varnish-software.com>
Date:   Fri Nov 10 14:24:31 2017 +0100

    Assert that an h2 stream is not scheduled on cleanup

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 90b4b6d..3ad572b 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -169,6 +169,7 @@ h2_del_req(struct worker *wrk, const struct h2_req *r2)
 	int r;
 
 	CHECK_OBJ_NOTNULL(r2, H2_REQ_MAGIC);
+	AZ(r2->scheduled);
 	h2 = r2->h2sess;
 	CHECK_OBJ_NOTNULL(h2, H2_SESS_MAGIC);
 	ASSERT_RXTHR(h2);
diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c
index b7e1783..b00395f 100644
--- a/bin/varnishd/http2/cache_http2_session.c
+++ b/bin/varnishd/http2/cache_http2_session.c
@@ -240,6 +240,7 @@ h2_ou_session(struct worker *wrk, struct h2_sess *h2,
 	    sizeof H2_prism);
 	if (hs != HTC_S_COMPLETE) {
 		VSLb(h2->vsl, SLT_Debug, "H2: No/Bad OU PRISM (hs=%d)", hs);
+		r2->scheduled = 0;
 		h2_del_req(wrk, r2);
 		return (0);
 	}


More information about the varnish-commit mailing list