Skip to content

Commit

Permalink
set assume_http2 true to support server without protocol negotiation …
Browse files Browse the repository at this point in the history
…via ALPN.
  • Loading branch information
patrickkuo committed Jan 7, 2025
1 parent b0c9a7c commit bf7ed0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/sui-rpc-api/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ impl Client {
let mut endpoint = tonic::transport::Endpoint::from(uri.clone());
if uri.scheme() == Some(&http::uri::Scheme::HTTPS) {
endpoint = endpoint
.tls_config(ClientTlsConfig::new().with_enabled_roots())
.tls_config(
ClientTlsConfig::new()
.with_enabled_roots()
.assume_http2(true),
)
.map_err(Into::into)
.map_err(Status::from_error)?;
}
Expand Down

0 comments on commit bf7ed0c

Please sign in to comment.