Skip to content

Commit feac5e5

Browse files
committed
fix: Only send mtlsEndpoint if it is non-null
1 parent d0f43e3 commit feac5e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gax-java/gax/src/main/java/com/google/api/gax/rpc/ClientContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public static ClientContext create(StubSettings settings) throws IOException {
223223
transportChannelProvider = transportChannelProvider.withEndpoint(endpoint);
224224
}
225225
transportChannelProvider = transportChannelProvider.withUseS2A(endpointContext.useS2A());
226-
if (transportChannelProvider.needsMtlsEndpoint()) {
226+
if (transportChannelProvider.needsMtlsEndpoint() && endpointContext.mtlsEndpoint() != null) {
227227
transportChannelProvider =
228228
transportChannelProvider.withMtlsEndpoint(endpointContext.mtlsEndpoint());
229229
}

0 commit comments

Comments
 (0)