quinn-rs / quinn

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

Make SendStream::finish synchronous #1840

Closed Ralith closed 1 month ago

Ralith commented 1 month ago

Followup to https://github.com/quinn-rs/quinn/pull/1699. SendStream::finish as a future has proved to be a footgun, so this converts it into a synchronous method, delegating "wait until received" duties to SendStream::stopped. We expect that to rarely be required in real applications, though it does come up several times in our tests where we specifically want some data to be received before we drop a connection or take a time measurement.