提交 9d18256c 编写于 作者: R rongtongjin

fix(trace):ignore IllegalStateException when remove shutdown hook

If shutdown of the JVM in progress already, we don't need to remove the hook, it will be removed by the JVM.

Close #1491
上级 203272c7
......@@ -216,7 +216,11 @@ public class AsyncTraceDispatcher implements TraceDispatcher {
public void removeShutdownHook() {
if (shutDownHook != null) {
try {
Runtime.getRuntime().removeShutdownHook(shutDownHook);
} catch (IllegalStateException e) {
// ignore - VM is already shutting down
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册