From 5f480de2ee7bf56e3cb15635c0bd0d71f6f7006a Mon Sep 17 00:00:00 2001 From: yifeizhuang Date: Tue, 12 Sep 2023 13:41:15 -0700 Subject: [PATCH] stub: enable throwing rejected execution exception on ThreadlessExecutor shutdown (#10555) --- stub/src/main/java/io/grpc/stub/ClientCalls.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stub/src/main/java/io/grpc/stub/ClientCalls.java b/stub/src/main/java/io/grpc/stub/ClientCalls.java index 13fb00d3b3..e4d675487d 100644 --- a/stub/src/main/java/io/grpc/stub/ClientCalls.java +++ b/stub/src/main/java/io/grpc/stub/ClientCalls.java @@ -58,8 +58,8 @@ public final class ClientCalls { @VisibleForTesting static boolean rejectRunnableOnExecutor = - !Strings.isNullOrEmpty(System.getenv("GRPC_CLIENT_CALL_REJECT_RUNNABLE")) - && Boolean.parseBoolean(System.getenv("GRPC_CLIENT_CALL_REJECT_RUNNABLE")); + Strings.isNullOrEmpty(System.getenv("GRPC_CLIENT_CALL_REJECT_RUNNABLE")) + || Boolean.parseBoolean(System.getenv("GRPC_CLIENT_CALL_REJECT_RUNNABLE")); // Prevent instantiation private ClientCalls() {}