feat(body): identify aborted body write errors

This commit is contained in:
Steven Fackler
2019-09-12 17:46:00 -07:00
committed by Sean McArthur
parent 2b0405c48c
commit dc54ee199f
2 changed files with 13 additions and 1 deletions

View File

@@ -260,7 +260,7 @@ impl Body {
ref mut abort_rx,
} => {
if let Poll::Ready(Ok(())) = Pin::new(abort_rx).poll(cx) {
return Poll::Ready(Some(Err(crate::Error::new_body_write("body write aborted"))));
return Poll::Ready(Some(Err(crate::Error::new_body_write_aborted())));
}
match ready!(Pin::new(rx).poll_next(cx)?) {