quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

Question: how to set timeout of endpoint.accept() #1566

Closed Archieeeeee closed 1 year ago

Archieeeeee commented 1 year ago

Is there any config can be used to set timeout for server end, max_idle_timeout works for client

Ralith commented 1 year ago

Idle timeouts work the same for both endpoints, and should be used for closing the connection, not interrupting individual operations. To time out any async operation, consider a helper like tokio::time::timeout.