quinn-rs / quinn

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

Refuse incoming/forbid outgoing connections after endpoint is closed #1829

Closed Ralith closed 2 months ago

Ralith commented 2 months ago

Endpoint::accept can yield None after Endpoint::close is called and any previously pending Incoming connections are drained, so it's likely that the application's accept loop will terminate and not see any further Incomings. This could lead to painful slow timeouts, so let's eagerly reject them instead.