CLEANUP: mux-h1/mux-pt: Remove useless test on SE_FL_SHR/SE_FL_SHW flags

It is already performed by the called, sc_conn_shutr() and
sc_conn_shutw(). So there is no reason to still test these flags in the PT
and H1 muxes.
This commit is contained in:
Christopher Faulet 2023-03-29 09:34:25 +02:00
parent 147e18f9d8
commit 88dd0b0d13
2 changed files with 0 additions and 6 deletions

View File

@ -3550,8 +3550,6 @@ static void h1_shutw(struct stconn *sc, enum co_shw_mode mode)
TRACE_ENTER(H1_EV_STRM_SHUT, h1c->conn, h1s, 0, (size_t[]){mode}); TRACE_ENTER(H1_EV_STRM_SHUT, h1c->conn, h1s, 0, (size_t[]){mode});
if (se_fl_test(h1s->sd, SE_FL_SHW))
goto end;
if (se_fl_test(h1s->sd, SE_FL_KILL_CONN)) { if (se_fl_test(h1s->sd, SE_FL_KILL_CONN)) {
TRACE_STATE("stream wants to kill the connection", H1_EV_STRM_SHUT, h1c->conn, h1s); TRACE_STATE("stream wants to kill the connection", H1_EV_STRM_SHUT, h1c->conn, h1s);
goto do_shutw; goto do_shutw;

View File

@ -466,8 +466,6 @@ static void mux_pt_shutr(struct stconn *sc, enum co_shr_mode mode)
TRACE_ENTER(PT_EV_STRM_SHUT, conn, sc); TRACE_ENTER(PT_EV_STRM_SHUT, conn, sc);
if (se_fl_test(ctx->sd, SE_FL_SHR))
return;
se_fl_clr(ctx->sd, SE_FL_RCV_MORE | SE_FL_WANT_ROOM); se_fl_clr(ctx->sd, SE_FL_RCV_MORE | SE_FL_WANT_ROOM);
if (conn_xprt_ready(conn) && conn->xprt->shutr) if (conn_xprt_ready(conn) && conn->xprt->shutr)
conn->xprt->shutr(conn, conn->xprt_ctx, conn->xprt->shutr(conn, conn->xprt_ctx,
@ -487,8 +485,6 @@ static void mux_pt_shutw(struct stconn *sc, enum co_shw_mode mode)
TRACE_ENTER(PT_EV_STRM_SHUT, conn, sc); TRACE_ENTER(PT_EV_STRM_SHUT, conn, sc);
if (se_fl_test(ctx->sd, SE_FL_SHW))
return;
if (conn_xprt_ready(conn) && conn->xprt->shutw) if (conn_xprt_ready(conn) && conn->xprt->shutw)
conn->xprt->shutw(conn, conn->xprt_ctx, conn->xprt->shutw(conn, conn->xprt_ctx,
(mode == CO_SHW_NORMAL)); (mode == CO_SHW_NORMAL));