mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 14:51:27 +02:00
MINOR: stconn: consider CF_SHUTW for sc_is_send_allowed()
When a shutdown(WR) is performed, send is no longer allowed, and that is currently handled by the explicit cs_done_get() in the various shutw() calls. That's a bit ugly and complicated for no reason, let's simply integrate the test of SHUTW in sc_is_send_allowed(). Note that the test could also be added wherever sc_is_send_allowed() is used but for now proceeding like this limits the changes.
This commit is contained in:
parent
902ba7e2bc
commit
a1547ce0a0
@ -348,6 +348,11 @@ static inline const char *cs_state_str(int state)
|
|||||||
__attribute__((warn_unused_result))
|
__attribute__((warn_unused_result))
|
||||||
static inline int sc_is_send_allowed(const struct stconn *sc)
|
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);
|
return cs_tx_endp_ready(sc) && !cs_tx_blocked(sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user