MINOR: channel/applets: Stop to test CF_WRITE_ERROR flag if CF_SHUTW is enough

In applets, we stop processing when a write error (CF_WRITE_ERROR) or a shutdown
for writes (CF_SHUTW) is detected. However, any write error leads to an
immediate shutdown for writes. Thus, it is enough to only test if CF_SHUTW is
set.
This commit is contained in:
Christopher Faulet
2023-01-04 14:11:10 +01:00
parent 4b490b7517
commit da89e9b95b
15 changed files with 24 additions and 26 deletions

View File

@@ -1227,7 +1227,7 @@ static int cli_io_handler_show_env(struct appctx *appctx)
struct stconn *sc = appctx_sc(appctx);
char **var = ctx->var;
if (unlikely(sc_ic(sc)->flags & (CF_WRITE_ERROR|CF_SHUTW)))
if (unlikely(sc_ic(sc)->flags & CF_SHUTW))
return 1;
chunk_reset(&trash);
@@ -1264,7 +1264,7 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
int fd = fdctx->fd;
int ret = 1;
if (unlikely(sc_ic(sc)->flags & (CF_WRITE_ERROR|CF_SHUTW)))
if (unlikely(sc_ic(sc)->flags & CF_SHUTW))
goto end;
chunk_reset(&trash);