DEBUG: stconn: Add a CHECK_IF() when I/O are performed on a orphan SC

When no endpoint is attached to a SC, it is unexpected to have I/O (receive
or send). But we honestly don't know if it happens or not. So a CHECK_IF()
is added to be able to track such calls.
This commit is contained in:
Christopher Faulet 2026-03-09 18:43:59 +01:00
parent b2b0d1a8be
commit 00563233b7

View File

@ -708,6 +708,8 @@ void sc_chk_rcv(struct stconn *sc)
appctx_wakeup(__sc_appctx(sc));
}
else {
/* In theory, it should not happen. This CHECK_IF will be used to validate it (or not...) */
CHECK_IF(!sc_ep_test(sc, SE_FL_T_MUX|SE_FL_T_APPLET));
if (!(sc->flags & SC_FL_DONT_WAKE))
task_wakeup(sc_strm_task(sc), TASK_WOKEN_IO);
}
@ -799,6 +801,9 @@ static inline void sc_chk_snd(struct stconn *sc)
}
}
else {
/* In theory, it should not happen. This CHECK_IF will be used to validate it (or not...) */
CHECK_IF(!sc_ep_test(sc, SE_FL_T_MUX|SE_FL_T_APPLET));
if (unlikely(sc->state != SC_ST_EST || (sc->flags & SC_FL_SHUT_DONE)))
return;