diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java index 0f6f447bdf3b6..4d44ea903507a 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java @@ -869,7 +869,7 @@ private void shutdownExecutors() throws PulsarClientException { } if (createdScheduledProviders && scheduledExecutorProvider != null && !scheduledExecutorProvider.isShutdown()) { try { - externalExecutorProvider.shutdownNow(); + scheduledExecutorProvider.shutdownNow(); } catch (Throwable t) { log.warn("Failed to shutdown scheduledExecutorProvider", t); pulsarClientException = PulsarClientException.unwrap(t);