From 8338be9850c581f64805b24e8e456c397f55c34a Mon Sep 17 00:00:00 2001 From: TomasHofman Date: Thu, 13 Feb 2020 18:39:35 +0100 Subject: [PATCH] Prevent a shutdown hook from being removed when a shutdown is in progress (#689) Signed-off-by: Tomas Hofman --- .../src/main/java/io/jaegertracing/internal/JaegerTracer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jaeger-core/src/main/java/io/jaegertracing/internal/JaegerTracer.java b/jaeger-core/src/main/java/io/jaegertracing/internal/JaegerTracer.java index fcc2a2704..2892c4297 100644 --- a/jaeger-core/src/main/java/io/jaegertracing/internal/JaegerTracer.java +++ b/jaeger-core/src/main/java/io/jaegertracing/internal/JaegerTracer.java @@ -133,6 +133,7 @@ protected JaegerTracer(JaegerTracer.Builder builder) { shutdownHook = new Thread() { @Override public void run() { + shutdownHook = null; JaegerTracer.this.close(); } };