Skip to content

Commit 72e5298

Browse files
committed
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.
1 parent 113745e commit 72e5298

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stconn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ static void sc_conn_eos(struct stconn *sc)
12361236
ic->flags |= CF_READ_EVENT;
12371237
sc_ep_report_read_activity(sc);
12381238

1239-
if (!sc_state_in(sc->state, SC_SB_CON|SC_SB_RDY|SC_SB_EST))
1239+
if (sc->state != SC_ST_EST)
12401240
return;
12411241

12421242
if (sc->flags & SC_FL_SHUT_DONE)
@@ -1940,7 +1940,7 @@ static void sc_applet_eos(struct stconn *sc)
19401940

19411941
/* Note: on abort, we don't call the applet */
19421942

1943-
if (!sc_state_in(sc->state, SC_SB_CON|SC_SB_RDY|SC_SB_EST))
1943+
if (sc->state != SC_ST_EST)
19441944
return;
19451945

19461946
if (sc->flags & SC_FL_SHUT_DONE) {

0 commit comments

Comments
 (0)