From c59049cbb470ef4c34935b193a0b7a8fd704a350 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Sat, 6 Jul 2024 11:37:00 +0200 Subject: [PATCH] Clear the VertxMDC ThreadLocal when shutting down Vert.x --- .../java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java index e0adae3bef1d2..d7e20c81b4a95 100644 --- a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java +++ b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java @@ -451,6 +451,7 @@ public void handle(AsyncResult ar) { Thread.currentThread().interrupt(); throw new IllegalStateException("Exception when closing Vert.x instance", e); } + VertxMDC.INSTANCE.clear(); LateBoundMDCProvider.setMDCProviderDelegate(null); vertx = null; }