Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic in UpgradeableConnection due to unwrap #3626

Closed
DDtKey opened this issue Apr 10, 2024 · 0 comments · Fixed by #3627
Closed

Panic in UpgradeableConnection due to unwrap #3626

DDtKey opened this issue Apr 10, 2024 · 0 comments · Fixed by #3627
Labels
C-bug Category: bug. Something is wrong. This is bad!

Comments

@DDtKey
Copy link
Contributor

DDtKey commented Apr 10, 2024

Version
1.x.x & current master (203d1b090d0d0349c7e373e881ac4ddba72129be)

Platform
Seems doesn't matter

Description

I encountered a panic for http/1 connection:

panic was raised: panicked at .../src/server/conn/http1.rs:504:56

I.e this line has panicked due to unwrap

match ready!(Pin::new(&mut self.inner.as_mut().unwrap().conn).poll(cx)) {

I wasn't manage to build an MRE yet, but the issue is worth filling out

Btw, it's already second panic due to unwrapping after 1.x release (see #3615). I think the use of unwrap should be given more attention

@DDtKey DDtKey added the C-bug Category: bug. Something is wrong. This is bad! label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug. Something is wrong. This is bad!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant