mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MINOR: stconn: Remove useless test on sedesc on detach to release the xref
When the SC is detached from the endpoint, the xref between the endpoints is removed. At this stage, the sedesc cannot be undefined. So we can remove the test on it. This issue should fix the issue #2156. No backport needed.
This commit is contained in:
parent
1601eebcd1
commit
6eb53b138d
12
src/stconn.c
12
src/stconn.c
@ -351,18 +351,16 @@ int sc_attach_strm(struct stconn *sc, struct stream *strm)
|
||||
static void sc_detach_endp(struct stconn **scp)
|
||||
{
|
||||
struct stconn *sc = *scp;
|
||||
struct xref *peer;
|
||||
|
||||
if (!sc)
|
||||
return;
|
||||
|
||||
if (sc->sedesc) {
|
||||
struct xref *peer;
|
||||
|
||||
/* Remove my link in the original objects. */
|
||||
peer = xref_get_peer_and_lock(&sc->sedesc->xref);
|
||||
if (peer)
|
||||
xref_disconnect(&sc->sedesc->xref, peer);
|
||||
}
|
||||
/* Remove my link in the original objects. */
|
||||
peer = xref_get_peer_and_lock(&sc->sedesc->xref);
|
||||
if (peer)
|
||||
xref_disconnect(&sc->sedesc->xref, peer);
|
||||
|
||||
if (sc_ep_test(sc, SE_FL_T_MUX)) {
|
||||
struct connection *conn = __sc_conn(sc);
|
||||
|
Loading…
Reference in New Issue
Block a user