diff --git a/stub/src/main/java/io/grpc/stub/ClientCalls.java b/stub/src/main/java/io/grpc/stub/ClientCalls.java index 84417ee7ebf..04ed83f083a 100644 --- a/stub/src/main/java/io/grpc/stub/ClientCalls.java +++ b/stub/src/main/java/io/grpc/stub/ClientCalls.java @@ -39,7 +39,6 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.Future; -import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.locks.LockSupport; import java.util.logging.Level; import java.util.logging.Logger; @@ -162,7 +161,6 @@ public static RespT blockingUnaryCall( // Something very bad happened. All bets are off; it may be dangerous to wait for onClose(). throw cancelThrow(call, e); } finally { - executor.shutdown(); if (interrupt) { Thread.currentThread().interrupt(); } @@ -628,9 +626,6 @@ private Object waitForNext() { // Now wait for onClose() to be called, so interceptors can clean up } } - if (next == this || next instanceof StatusRuntimeException) { - threadless.shutdown(); - } return next; } } finally { @@ -717,10 +712,7 @@ private static final class ThreadlessExecutor extends ConcurrentLinkedQueue