Commit 9aa45a9f authored by Dridi Boukelmoune's avatar Dridi Boukelmoune Committed by Simon Stridsberg

http2_proto: Send GOAWAY before leaving the rx loop

parent 05d91fac
......@@ -412,7 +412,7 @@ h2_tx_goaway(struct worker *wrk, struct h2_sess *h2, h2_error h2e)
ASSERT_RXTHR(h2);
AN(h2e);
if (h2->goaway)
if (h2->goaway || !h2e->send_goaway)
return;
h2->goaway = 1;
......@@ -1469,6 +1469,7 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
if (h2e != NULL && h2e->connection) {
h2->error = h2e;
h2_tx_goaway(wrk, h2, h2e);
return (0);
}
......
......@@ -233,17 +233,28 @@ client c1 {
} -run
client c1 {
stream 0 {
rxgoaway
expect goaway.err == NO_ERROR
expect goaway.laststream == 3
} -start
stream 1 {
txreq -nohdrend
txreq -nostrend
txrst -err 2
} -run
stream 3 {
txreq -nohdrend
txreq -nostrend
txrst -err 0x666
} -run
stream 0 -wait
} -run
client c1 {
stream 0 {
rxgoaway
expect goaway.err == NO_ERROR
expect goaway.laststream == 1
} -start
stream 1 {
txreq
rxresp
......@@ -252,6 +263,7 @@ client c1 {
# RST_STREAM on closed stream
txrst
} -run
stream 0 -wait
} -run
......
......@@ -32,7 +32,7 @@ varnish v1 -cliok "param.set debug +syncvsl"
logexpect l1 -v v1 -g raw {
expect * 1001 ReqAcct "80 7 87 78 8 86"
expect * 1000 ReqAcct "45 8 53 54 20 74"
expect * 1000 ReqAcct "45 8 53 63 28 91"
} -start
client c1 {
......
......@@ -25,12 +25,17 @@ logexpect l1 -v v1 -g raw -i Debug {
} -start
client c1 {
stream 0 {
rxgoaway
expect goaway.err == NO_ERROR
expect goaway.laststream == 1
} -start
stream 1 {
txreq
barrier b1 sync
txrst
} -run
expect_close
stream 0 -wait
} -start
logexpect l1 -wait
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment