From bf7ed0c04eaddf1c0677c3cffb99d2da2adcc582 Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 7 Jan 2025 10:50:32 +0000 Subject: [PATCH] set assume_http2 true to support server without protocol negotiation via ALPN. --- crates/sui-rpc-api/src/client/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/sui-rpc-api/src/client/mod.rs b/crates/sui-rpc-api/src/client/mod.rs index bf1ef56d705b8..753aff133def3 100644 --- a/crates/sui-rpc-api/src/client/mod.rs +++ b/crates/sui-rpc-api/src/client/mod.rs @@ -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)?; }