You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by aa...@apache.org on 2022/12/13 01:47:26 UTC
[rocketmq-clients] branch master updated: Remove shutdown hook
This is an automated email from the ASF dual-hosted git repository.
aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
The following commit(s) were added to refs/heads/master by this push:
new 6843571f Remove shutdown hook
6843571f is described below
commit 6843571f4d1215cfc9756b0d30dd4bef7f9a977e
Author: Aaron Ai <ya...@gmail.com>
AuthorDate: Mon Dec 12 17:53:27 2022 +0800
Remove shutdown hook
---
.../main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java | 5 -----
1 file changed, 5 deletions(-)
diff --git a/java/client/src/main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java b/java/client/src/main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java
index 55292619..c475bfc0 100644
--- a/java/client/src/main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java
+++ b/java/client/src/main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java
@@ -170,11 +170,6 @@ public abstract class ClientImpl extends AbstractIdleService implements Client,
TimeUnit.SECONDS,
new LinkedBlockingQueue<>(),
new ThreadFactoryImpl("CommandExecutor", clientIdIndex));
-
- Runtime.getRuntime().addShutdownHook(new Thread(() -> {
- log.info("JVM shutdown hook is invoked, clientId={}, state={}", clientId, ClientImpl.this.state());
- ClientImpl.this.stopAsync().awaitTerminated();
- }));
}