diff --git a/include/haproxy/quic_conn.h b/include/haproxy/quic_conn.h index 640fe5bcc..6263231c5 100644 --- a/include/haproxy/quic_conn.h +++ b/include/haproxy/quic_conn.h @@ -606,20 +606,6 @@ int qc_parse_hd_form(struct quic_rx_packet *pkt, int quic_dgram_parse(struct quic_dgram *dgram, struct quic_conn *qc, struct listener *li); -/* Wake up every QUIC connections on closing/draining state if process stopping - * is active. They will be immediately released so this ensures haproxy process - * stopping is not delayed by them. - */ -static inline void quic_handle_stopping(void) -{ - struct quic_conn *qc; - - if (stopping) { - list_for_each_entry(qc, &th_ctx->quic_conns_clo, el_th_ctx) - task_wakeup(qc->idle_timer_task, TASK_WOKEN_OTHER); - } -} - int qc_set_tid_affinity(struct quic_conn *qc, uint new_tid, struct listener *new_li); void qc_finalize_affinity_rebind(struct quic_conn *qc); diff --git a/src/haproxy.c b/src/haproxy.c index 33e8ae867..935cb52e8 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2995,9 +2995,6 @@ void run_poll_loop() /* stop muxes/quic-conns before acknowledging stopping */ if (!(tg_ctx->stopping_threads & ti->ltid_bit)) { task_wakeup(mux_stopping_data[tid].task, TASK_WOKEN_OTHER); -#ifdef USE_QUIC - quic_handle_stopping(); -#endif wake = 1; } diff --git a/src/quic_conn.c b/src/quic_conn.c index 9bceea7e6..4994cb89a 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -2021,9 +2021,11 @@ void qc_finalize_affinity_rebind(struct quic_conn *qc) BUG_ON(!(qc->flags & QUIC_FL_CONN_AFFINITY_CHANGED)); qc->flags &= ~QUIC_FL_CONN_AFFINITY_CHANGED; - /* A connection must not pass to closing state until affinity rebind - * is completed. Else quic_handle_stopping() may miss it during process - * stopping cleanup. + /* If quic_conn is closing it is unnecessary to migrate it as it will + * be soon released. Besides, special care must be taken for CLOSING + * connections (using quic_cc_conn and th_ctx.quic_conns_clo list for + * instance). This should never occur as CLOSING connections are + * skipped by quic_sock_accept_conn(). */ BUG_ON(qc->flags & (QUIC_FL_CONN_CLOSING|QUIC_FL_CONN_DRAINING));