Skip to content

Commit ecc1802

Browse files
committed
Skip S2A on platforms where netty-tcnative is not available
1 parent 6efe7e8 commit ecc1802

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,17 @@ private String determineEndpoint() throws IOException {
309309
/** Determine if S2A can be used */
310310
@VisibleForTesting
311311
boolean shouldUseS2A() {
312+
// If running on windows or macos intel, skip S2A. S2A has runtime
313+
// dependency on netty-tcnative which is dropping support on these platforms.
314+
// https://github.com/netty/netty-tcnative/issues/898
315+
// https://github.com/netty/netty-tcnative/issues/897
316+
if (System.getProperty("os.name").contains("Windows") ||
317+
(System.getProperty("os.name").contains("OS X")
318+
&& System.getProperty("os.arch").contains("x86_64"))) {
319+
return false;
320+
}
321+
322+
312323
// If mTLS endpoint is not available, skip S2A
313324
if (Strings.isNullOrEmpty(mtlsEndpoint())) {
314325
return false;

0 commit comments

Comments
 (0)