fix(http2): correctly propagate HTTP2 request cancellation

This commit is contained in:
Sean McArthur
2019-06-03 14:30:30 -07:00
parent 01c03db7ea
commit 50198851a2
2 changed files with 35 additions and 5 deletions

View File

@@ -163,16 +163,15 @@ where
let content_length = content_length_parse_all(res.headers());
let res = res.map(|stream|
::Body::h2(stream, content_length));
cb.send(Ok(res));
Ok(res)
},
Err(err) => {
debug!("client response error: {}", err);
cb.send(Err((::Error::new_h2(err), None)));
Err((::Error::new_h2(err), None))
}
}
Ok(())
});
self.executor.execute(fut)?;
self.executor.execute(cb.send_when(fut))?;
continue;
},