diff --git a/knot2/crates/knot-edge/src/quic.rs b/knot2/crates/knot-edge/src/quic.rs index de5a95d6f..742248321 100644 --- a/knot2/crates/knot-edge/src/quic.rs +++ b/knot2/crates/knot-edge/src/quic.rs @@ -124,6 +124,11 @@ async fn serve_connection( quic.close(0u32.into(), b"drain timeout"); break; } + // accept goes after this because the select is biased and quinn treats every connection + // as 0-rtt until it's confirmed. a full handshake's first request would get a 425 + () = &mut confirmation, if !confirmed => { + confirmed = true; + } resolved = h3_conn.accept() => match resolved { Ok(Some(resolver)) => { let app = app.clone(); @@ -143,9 +148,6 @@ async fn serve_connection( break; } }, - () = &mut confirmation, if !confirmed => { - confirmed = true; - } } } Ok(())