hyperium / h2

HTTP 2.0 client & server implementation for Rust.
MIT License
1.35k stars 270 forks source link

Read body in the example server #544

Closed nox closed 3 years ago

kornelski commented 3 years ago

Whoa, poll_closed is a gotcha. Would it be possible to detect this error from h2 somehow?

nox commented 3 years ago

I don't think so, the connection isn't gone or anything, it's just that no one is polling it anymore, ever.

nox commented 3 years ago

The docs could be improved and a proper future on which to await could be introduced though. Connection::graceful_shutdown exists but it still requires the connection to be polled until Poll::Ready afterwards, which is unfortunate IMO.

nox commented 3 years ago

I dunno if you're still tweaking something

You know how it is, you think you are done and then the style lint complains.