Commit 049ce0e7 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Fix h2 error handling in varnishtest

If varnish closes the connection while a client is waiting for an
rxsomething command you may run into this kind of scenario:

    ***  c1   HTTP2 rx failed (fd:20 read: Connection reset by peer)
    ***  c1   rx: stream: 0, type: DATA (0), flags: 0x00, size: 0
    **** c1   s0 - no data
    ---- c1   Wrong frame type DATA (0) wanted SETTINGS

This was already done correctly for the frame body.
parent 34554816
......@@ -710,7 +710,7 @@ receive_frame(void *priv)
}
AZ(pthread_mutex_unlock(&hp->mtx));
if (!get_bytes(hp, hdr, 9)) {
if (get_bytes(hp, hdr, sizeof hdr) <= 0) {
AZ(pthread_mutex_lock(&hp->mtx));
VTAILQ_FOREACH(s, &hp->streams, list)
AZ(pthread_cond_signal(&s->cond));
......
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