Closed
Description
Version
Encountered with 1.x
Platform
Doesn't matter
Description
Attempt to call graceful_shutdown
for H1 connection which is upgraded (=> Poll::Ready
) leads to panic:
panic was raised: panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-1.2.0/src/server/conn/http1.rs:483:38:
called `Option::unwrap()` on a `None` value
The reason is this line:
Pin::new(self.inner.as_mut().unwrap()).graceful_shutdown()
When connection is Upgraded (& future is Ready
), it's None
hyper/src/server/conn/http1.rs
Lines 502 to 506 in bc9a86f
So we should avoid unwrapping