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

@@ -534,7 +534,7 @@ static inline void channel_check_timeouts(struct channel *chn)
unlikely(tick_is_expired(chn->rex, now_ms)))
chn->flags |= CF_READ_TIMEOUT;
if (likely(!(chn->flags & (CF_SHUTW|CF_WRITE_TIMEOUT|CF_WRITE_EVENT|CF_WRITE_ERROR))) &&
if (likely(!(chn->flags & (CF_SHUTW|CF_WRITE_TIMEOUT|CF_WRITE_EVENT))) &&
unlikely(tick_is_expired(chn->wex, now_ms)))
chn->flags |= CF_WRITE_TIMEOUT;