MINOR: conn-stream: Rely on endpoint shutdown flags to shutdown an applet

cs_applet_shut() now relies on CS_EP_SH* flags to performed the applet
shutdown. It means the applet release callback is called if there is no
CS_EP_SHR or CS_EP_SHW flags set. And it set these flags, CS_EP_SHRR and
CS_EP_SHWN more specifically, before exiting.

This way, cs_applet_shut() is the really equivalent to cs_conn_shut().
This commit is contained in:
Christopher Faulet 2022-04-21 08:50:00 +02:00
parent ca6c9bba82
commit 02ef0ff061

View File

@ -476,8 +476,13 @@ void cs_applet_shut(struct conn_stream *cs)
{
struct appctx *appctx = __cs_appctx(cs);
if (appctx->applet->release && !cs_state_in(cs->state, CS_SB_DIS|CS_SB_CLO))
if (cs->endp->flags & (CS_EP_SHR|CS_EP_SHW))
return;
if (appctx->applet->release)
appctx->applet->release(appctx);
cs->endp->flags |= CS_EP_SHRR | CS_EP_SHWN;
}
/*