quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.57k stars 363 forks source link

0-RTT packets can be lost due to race condition introduced along with Incoming #1820

Closed gretchenfrage closed 1 month ago

gretchenfrage commented 2 months ago

Unfortunately it looks like in #1752 I accidentally introduced a bug. Apologies for not catching it.

Bug description: If a client sends a 0-RTT datagram to the server after sending the datagram with its Initial packet, and it is received and processed by the endpoint before the corresponding Incoming is accept-ed, the 0-RTT packet will not find any associated connection and thus be dropped. As a consequence, this seems to cause request/response pairs on connections where this occurs to actually take 3 round trips to go through successfully.

I am working on a fix, and I will see if I can get a PR opened for it tomorrow.

djc commented 2 months ago

Thanks for following up on this!