diff --git a/tokio-quiche/src/quic/io/worker.rs b/tokio-quiche/src/quic/io/worker.rs index 69a9266147e..c5f672f9c90 100644 --- a/tokio-quiche/src/quic/io/worker.rs +++ b/tokio-quiche/src/quic/io/worker.rs @@ -704,7 +704,9 @@ where async fn wait_for_data_or_handshake( &mut self, qconn: &mut QuicheConnection, quic_application: &mut A, ) -> QuicResult { - if quic_application.should_act() { + let connection_ready = qconn.is_established() || qconn.is_in_early_data(); + + if connection_ready && quic_application.should_act() { // Poll the application to make progress. // // Once the connection has been established (i.e. the handshake is