mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-04 22:32:33 -04:00
Revert e8826ded5f.
This reverts commit "BUG/MEDIUM: mux_pt: Make sure we don't have a conn_stream before freeing.". mux_pt_io_cb() is only used if we have no associated stream, so we will never have a cs, so there's no need to check that, and we of course have to destroy the mux in mux_pt_detach() if we have no associated session, or if there's an error on the connection. This should be backported to 2.0 and 1.9.
This commit is contained in:
parent
8cdc167df8
commit
9dce2c53a8
1 changed files with 4 additions and 5 deletions
|
|
@ -51,10 +51,9 @@ static struct task *mux_pt_io_cb(struct task *t, void *tctx, unsigned short stat
|
|||
struct mux_pt_ctx *ctx = tctx;
|
||||
|
||||
conn_sock_drain(ctx->conn);
|
||||
if (ctx->conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH)) {
|
||||
if (!ctx->cs)
|
||||
mux_pt_destroy(ctx);
|
||||
} else
|
||||
if (ctx->conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH))
|
||||
mux_pt_destroy(ctx);
|
||||
else
|
||||
ctx->conn->xprt->subscribe(ctx->conn, ctx->conn->xprt_ctx, SUB_RETRY_RECV,
|
||||
&ctx->wait_event);
|
||||
|
||||
|
|
@ -194,7 +193,7 @@ static void mux_pt_detach(struct conn_stream *cs)
|
|||
!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH))) {
|
||||
ctx->cs = NULL;
|
||||
conn->xprt->subscribe(conn, conn->xprt_ctx, SUB_RETRY_RECV, &ctx->wait_event);
|
||||
} else if (!ctx->cs)
|
||||
} else
|
||||
/* There's no session attached to that connection, destroy it */
|
||||
mux_pt_destroy(ctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue