diff --git a/src/quic_conn.c b/src/quic_conn.c index b23b433f9..16e155d7d 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -836,6 +836,10 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state) qc_set_timer(qc); qc_el_rx_pkts_del(qc->hel); qc_release_pktns_frms(qc, qc->hel->pktns); + if (!qc_is_listener(qc)) { + /* I/O callback switch */ + qc->wait_event.tasklet->process = quic_conn_app_io_cb; + } } if (qc_is_listener(qc) && st >= QUIC_HS_ST_COMPLETE) { @@ -1284,8 +1288,7 @@ struct quic_conn *qc_new_conn(const struct quic_version *qv, int ipv4, qc->max_ack_delay = 0; /* Only one path at this time (multipath not supported) */ qc->path = &qc->paths[0]; - quic_cc_path_init(qc->path, ipv4, - server ? l->bind_conf->max_cwnd : 0, + quic_cc_path_init(qc->path, ipv4, server ? l->bind_conf->max_cwnd : 0, cc_algo ? cc_algo : default_quic_cc_algo, qc); if (local_addr) diff --git a/src/quic_ssl.c b/src/quic_ssl.c index c806189f6..c129add4f 100644 --- a/src/quic_ssl.c +++ b/src/quic_ssl.c @@ -955,10 +955,10 @@ static int qc_ssl_provide_quic_data(struct ncbuf *ncbuf, qc->mux_state = QC_MUX_READY; } - /* I/O callback switch */ - qc->wait_event.tasklet->process = quic_conn_app_io_cb; qc->flags |= QUIC_FL_CONN_NEED_POST_HANDSHAKE_FRMS; if (qc_is_listener(ctx->qc)) { + /* I/O callback switch */ + qc->wait_event.tasklet->process = quic_conn_app_io_cb; qc->state = QUIC_HS_ST_CONFIRMED; if (!(qc->flags & QUIC_FL_CONN_ACCEPT_REGISTERED)) {