diff --git a/include/haproxy/cs_utils.h b/include/haproxy/cs_utils.h index 22b21b27b..10a03a8f5 100644 --- a/include/haproxy/cs_utils.h +++ b/include/haproxy/cs_utils.h @@ -348,6 +348,11 @@ static inline const char *cs_state_str(int state) __attribute__((warn_unused_result)) static inline int sc_is_send_allowed(const struct stconn *sc) { + struct channel *oc = sc_oc(sc); + + if (oc->flags & CF_SHUTW) + return 0; + return cs_tx_endp_ready(sc) && !cs_tx_blocked(sc); }