From 01ba4c0f9a012e7f4974b7809dcb7fbd92c5119c Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Wed, 2 Jun 2021 15:10:23 +0200 Subject: [PATCH] Correctly propagate dispatchToWorker to websockets Also use the executor included in the container info even if the code was working ok. Fixes #17571 --- .../undertow/websockets/runtime/WebsocketRecorder.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/WebsocketRecorder.java b/extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/WebsocketRecorder.java index 65085d860b390..a09af85f95c63 100644 --- a/extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/WebsocketRecorder.java +++ b/extensions/websockets/runtime/src/main/java/io/quarkus/undertow/websockets/runtime/WebsocketRecorder.java @@ -17,7 +17,6 @@ import io.quarkus.arc.Arc; import io.quarkus.arc.ManagedContext; import io.quarkus.arc.runtime.BeanContainer; -import io.quarkus.runtime.ExecutorRecorder; import io.quarkus.runtime.annotations.Recorder; import io.undertow.websockets.UndertowContainerProvider; import io.undertow.websockets.WebSocketDeploymentInfo; @@ -160,15 +159,10 @@ public T call(C context) throws Exception { }; } }), - false, + info.isDispatchToWorkerThread(), null, null, - new Supplier() { - @Override - public Executor get() { - return ExecutorRecorder.getCurrent(); - } - }, + info.getExecutor(), Collections.emptyList(), info.getMaxFrameSize()); for (Class i : info.getAnnotatedEndpoints()) {