diff --git a/src/mux_h1.c b/src/mux_h1.c index 3a031e04f..368dcc6c9 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -483,6 +483,9 @@ static void h1_release(struct h1c *h1c) tasklet_free(h1c->wait_event.task); h1s_destroy(h1c->h1s); + if (conn && h1c->wait_event.events != 0) + conn->xprt->unsubscribe(conn, h1c->wait_event.events, + &h1c->wait_event); pool_free(pool_head_h1c, h1c); } @@ -490,7 +493,6 @@ static void h1_release(struct h1c *h1c) conn->mux = NULL; conn->ctx = NULL; - conn_force_unsubscribe(conn); conn_stop_tracking(conn); conn_full_close(conn); if (conn->destroy_cb) diff --git a/src/mux_h2.c b/src/mux_h2.c index 894c4bdbb..adcd0b4df 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -642,6 +642,9 @@ static void h2_release(struct h2c *h2c) } if (h2c->wait_event.task) tasklet_free(h2c->wait_event.task); + if (h2c->wait_event.events != 0) + conn->xprt->unsubscribe(conn, h2c->wait_event.events, + &h2c->wait_event); pool_free(pool_head_h2c, h2c); } @@ -650,7 +653,6 @@ static void h2_release(struct h2c *h2c) conn->mux = NULL; conn->ctx = NULL; - conn_force_unsubscribe(conn); conn_stop_tracking(conn); conn_full_close(conn); if (conn->destroy_cb)