]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: applet: Don't call .release callback function twice
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 15 Mar 2022 10:29:59 +0000 (11:29 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 15 Mar 2022 10:47:53 +0000 (11:47 +0100)
commit9affa931cd38bfb7d59ddb4b9906da940258dceb
tree57c735ad2b38dabe2e08c4a188707b049eda4d8e
parent8f170c7fcacbf8576197b6356b73290fd2e3b082
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.
src/conn_stream.c