Skip to content

Commit da85450

Browse files
committed
check transportchannelprovider endpoint not the default endpoint.
1 parent 4bf3ade commit da85450

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ boolean shouldUseS2A() {
327327
}
328328

329329
// If a custom endpoint is being used, skip S2A.
330-
if (!Strings.isNullOrEmpty(clientSettingsEndpoint())) {
330+
if (!Strings.isNullOrEmpty(clientSettingsEndpoint())
331+
|| (transportChannelProviderEndpoint()
332+
== buildEndpointTemplate(serviceName(), resolvedUniverseDomain()))) {
331333
return false;
332334
}
333335

0 commit comments

Comments
 (0)