BUG/MEDIUM: applet: Don't call .release callback function twice
Since the CS/SI refactoring, the .release callback function may be called twice. The first call when a shutdown for read or for write is performed. The second one when the applet is detached from its conn-stream. The second call must be guarded, just like the first one, to only be performed is the stream-interface is not the in disconnected (SI_ST_DIS) or closed (SI_ST_CLO) state. To simplify the fix, we now always rely on si_applet_release() function. It is 2.6-specific, no backport is needed.
This commit is contained in:
parent
8f170c7fca
commit
9affa931cd
@ -129,8 +129,8 @@ void cs_detach_endp(struct conn_stream *cs)
|
||||
}
|
||||
}
|
||||
else if ((appctx = cs_appctx(cs))) {
|
||||
if (appctx->applet->release)
|
||||
appctx->applet->release(appctx);
|
||||
if (cs->si)
|
||||
si_applet_release(cs->si);
|
||||
appctx_free(appctx);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user