mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUG/MEDIUM: stconn: Don't forward shut for SC in connecting state
In connecting state, shutdown must not be forwarded or scheduled because otherwise this will prevent any connection retries. Indeed, if a EOS is reported by the mux during the connection establishment, this should be handled by the stream to eventually retries. If the write side is closed first, this will not be possible because the stconn will be switched in DIS state. If the shut is scheduled because pending data are blocked, the same may happen, depending on the abort-on-close option. This patch should be slowly be backported as far as 2.4. But an observation period is mandatory. On 2.4, the patch must be adapted to use the stream-interface API.
This commit is contained in:
parent
113745e6f0
commit
72e529829b
1 changed files with 2 additions and 2 deletions
|
|
@ -1236,7 +1236,7 @@ static void sc_conn_eos(struct stconn *sc)
|
|||
ic->flags |= CF_READ_EVENT;
|
||||
sc_ep_report_read_activity(sc);
|
||||
|
||||
if (!sc_state_in(sc->state, SC_SB_CON|SC_SB_RDY|SC_SB_EST))
|
||||
if (sc->state != SC_ST_EST)
|
||||
return;
|
||||
|
||||
if (sc->flags & SC_FL_SHUT_DONE)
|
||||
|
|
@ -1940,7 +1940,7 @@ static void sc_applet_eos(struct stconn *sc)
|
|||
|
||||
/* Note: on abort, we don't call the applet */
|
||||
|
||||
if (!sc_state_in(sc->state, SC_SB_CON|SC_SB_RDY|SC_SB_EST))
|
||||
if (sc->state != SC_ST_EST)
|
||||
return;
|
||||
|
||||
if (sc->flags & SC_FL_SHUT_DONE) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue