]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: mux-h2: don't test for impossible CS_FL_REOS conditions
authorWilly Tarreau <w@1wt.eu>
Tue, 14 May 2019 09:31:00 +0000 (11:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 14 May 2019 13:47:57 +0000 (15:47 +0200)
This flag is currently set when an incoming close was received, which
results in the stream being in either H2_SS_HREM, H2_SS_CLOSED, or
H2_SS_ERROR states, so let's remove the test for the OPEN and HLOC
cases.

src/mux_h2.c

index bf6c53de45d5752754d78d168f21549cff5288a6..9455ff952e8735e7fd8eaa2b09ec84e61acacf85 100644 (file)
@@ -2078,9 +2078,9 @@ static struct h2s *h2c_bck_handle_headers(struct h2c *h2c, struct h2s *h2s)
 
        if (h2s->cs && h2s->cs->flags & CS_FL_ERROR && h2s->st < H2_SS_ERROR)
                h2s->st = H2_SS_ERROR;
-       else if (h2s->cs && (h2s->cs->flags & (CS_FL_EOI|CS_FL_REOS)) && h2s->st == H2_SS_OPEN)
+       else if (h2s->cs && (h2s->cs->flags & CS_FL_EOI) && h2s->st == H2_SS_OPEN)
                h2s->st = H2_SS_HREM;
-       else if ((!h2s->cs || h2s->cs->flags & (CS_FL_EOI|CS_FL_REOS)) && h2s->st == H2_SS_HLOC)
+       else if ((!h2s->cs || h2s->cs->flags & CS_FL_EOI) && h2s->st == H2_SS_HLOC)
                h2s_close(h2s);
 
        return h2s;