src/client/http_client.rs - start_h2_connection: correctly return error during upgrade
This commit is contained in:
parent
a546a8a072
commit
ca6119551d
|
@ -299,10 +299,8 @@ impl HttpClient {
|
||||||
let status = resp.status();
|
let status = resp.status();
|
||||||
|
|
||||||
if status != http::StatusCode::SWITCHING_PROTOCOLS {
|
if status != http::StatusCode::SWITCHING_PROTOCOLS {
|
||||||
Self::api_response(resp)
|
Self::api_response(resp).await?;
|
||||||
.map(|_| Err(format_err!("unknown error")))
|
bail!("unknown error");
|
||||||
.await?;
|
|
||||||
unreachable!();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let upgraded = resp
|
let upgraded = resp
|
||||||
|
|
Loading…
Reference in New Issue