mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
BUG/MEDIUM: stream_interface: Don't bother doing chk_rcv/snd if not connected.
If the interface is not in state SI_ST_CON or SI_ST_EST, don't bother trying to send/recv data, we can't do it anyway, and if we're in SI_ST_TAR, that may lead to adding the SI_FL_ERR flag back on the stream_interface, while we don't want it. This should be backported to 1.9.
This commit is contained in:
parent
56897e20a3
commit
b2fc04ebef
@ -1015,7 +1015,8 @@ static void stream_int_shutw_conn(struct stream_interface *si)
|
||||
static void stream_int_chk_rcv_conn(struct stream_interface *si)
|
||||
{
|
||||
/* (re)start reading */
|
||||
tasklet_wakeup(si->wait_event.task);
|
||||
if (si->state == SI_ST_CON || si->state == SI_ST_EST)
|
||||
tasklet_wakeup(si->wait_event.task);
|
||||
}
|
||||
|
||||
|
||||
@ -1029,7 +1030,8 @@ static void stream_int_chk_snd_conn(struct stream_interface *si)
|
||||
struct channel *oc = si_oc(si);
|
||||
struct conn_stream *cs = __objt_cs(si->end);
|
||||
|
||||
if (unlikely(si->state > SI_ST_EST || (oc->flags & CF_SHUTW)))
|
||||
if (unlikely((si->state != SI_ST_CON && si->state != SI_ST_EST) ||
|
||||
(oc->flags & CF_SHUTW)))
|
||||
return;
|
||||
|
||||
if (unlikely(channel_is_empty(oc))) /* called with nothing to send ! */
|
||||
|
Loading…
Reference in New Issue
Block a user