Actually correct handling of HTTP/2 NO_ERROR

This commit is contained in:
FliegendeWurst 2021-05-17 18:06:25 +02:00
parent 8a1a5f6165
commit 044caf497c

View File

@ -24,6 +24,8 @@ pub struct ILIAS {
/// "http2 error: protocol error: not a result of an error"
fn error_is_http2(error: &reqwest::Error) -> bool {
error.source() // hyper::Error
.map(|x| x.source()) // -> h2::Error
.flatten()
.map(|x| x.downcast_ref::<h2::Error>())
.flatten()
.map(|x| x.reason())