Skip to content

Commit 1dd5ad2

Browse files
authoredMay 4, 2022
fix(transport): Emit HttpsUriWithoutTlsSupport only w/ tls feat (#996)
1 parent 2e19b66 commit 1dd5ad2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed
 

‎tonic/src/transport/service/connector.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,11 @@ where
7979
#[cfg(feature = "tls-roots-common")]
8080
let tls = self.tls_or_default(uri.scheme_str(), uri.host());
8181

82+
#[cfg(feature = "tls")]
8283
let is_https = uri.scheme_str() == Some("https");
8384
let connect = self.inner.make_connection(uri);
8485

8586
Box::pin(async move {
86-
#[cfg(not(feature = "tls"))]
87-
{
88-
if is_https {
89-
return Err(HttpsUriWithoutTlsSupport(()).into());
90-
}
91-
}
92-
9387
let io = connect.await?;
9488

9589
#[cfg(feature = "tls")]

0 commit comments

Comments
 (0)
Please sign in to comment.