You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "beiwei30 (GitHub)" <gi...@apache.org> on 2019/01/21 06:12:32 UTC
[GitHub] [incubator-dubbo] beiwei30 commented on pull request #3280:
Add shutdown command for telnet
don't call `unregister` here. When shutdown hook runs, it will lead to IllegalStateException if we try to remove the hook.
```java
static synchronized void add(Thread hook) {
if(hooks == null)
throw new IllegalStateException("Shutdown in progress");
if (hook.isAlive())
throw new IllegalArgumentException("Hook already running");
if (hooks.containsKey(hook))
throw new IllegalArgumentException("Hook previously registered");
hooks.put(hook, hook);
}
```
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3280 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org