Skip to content

Commit

Permalink
feat(h2): always include original h2 error on broken pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
nox authored and seanmonstar committed Oct 4, 2021
1 parent ecd5dc1 commit 6169db2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/proto/h2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ where
Some(Err(e)) => {
return Poll::Ready(match e.reason() {
Some(Reason::NO_ERROR) | Some(Reason::CANCEL) => Ok(()),
Some(Reason::STREAM_CLOSED) => Err(io::ErrorKind::BrokenPipe.into()),
Some(Reason::STREAM_CLOSED) => {
Err(io::Error::new(io::ErrorKind::BrokenPipe, e))
}
_ => Err(h2_to_io_error(e)),
})
}
Expand Down

0 comments on commit 6169db2

Please sign in to comment.