diff --git a/src/mux_h1.c b/src/mux_h1.c index 20f7a1239..e277e8f78 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1047,8 +1047,10 @@ static void h1_release(struct h1c *h1c) h1c->task = NULL; } - if (h1c->wait_event.tasklet) + if (h1c->wait_event.tasklet) { tasklet_free(h1c->wait_event.tasklet); + h1c->wait_event.tasklet = NULL; + } h1s_destroy(h1c->h1s); if (conn) { @@ -3590,6 +3592,10 @@ static void h1_shutw_conn(struct connection *conn) conn_xprt_shutw(conn); conn_sock_shutw(conn, !(h1c->flags & H1C_F_SILENT_SHUT)); + + if (h1c->wait_event.tasklet && !h1c->wait_event.events) + tasklet_wakeup(h1c->wait_event.tasklet); + TRACE_LEAVE(H1_EV_H1C_END, conn); }