fix h2 not using error response

This commit is contained in:
Ronald Chan 2019-09-09 15:19:11 +08:00
parent 8d61fe0925
commit e1c32ec015
1 changed files with 2 additions and 2 deletions

View File

@ -257,8 +257,8 @@ where
}
}
Ok(Async::NotReady) => Ok(Async::NotReady),
Err(_e) => {
let res: Response = Response::InternalServerError().finish();
Err(e) => {
let res: Response = e.into().into();
let (res, body) = res.replace_body(());
let mut send = send.take().unwrap();