From 750c460c836e5161537b77c611b6fa3b20128bd1 Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Fri, 27 Oct 2023 11:34:14 +0200 Subject: [PATCH] Fix sockjs example --- .../src/main/java/org/acme/extra/SockJsExample.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vertx-quickstart/src/main/java/org/acme/extra/SockJsExample.java b/vertx-quickstart/src/main/java/org/acme/extra/SockJsExample.java index 35bb5c9535..ba017a25fc 100644 --- a/vertx-quickstart/src/main/java/org/acme/extra/SockJsExample.java +++ b/vertx-quickstart/src/main/java/org/acme/extra/SockJsExample.java @@ -19,9 +19,9 @@ public class SockJsExample { public void init(@Observes Router router) { SockJSHandler sockJSHandler = SockJSHandler.create(vertx); - sockJSHandler.bridge(new SockJSBridgeOptions() + Router bridge = sockJSHandler.bridge(new SockJSBridgeOptions() .addOutboundPermitted(new PermittedOptions().setAddress("ticks"))); - router.route("/eventbus/*").handler(sockJSHandler); + router.route("/eventbus/*").subRouter(bridge); AtomicInteger counter = new AtomicInteger(); vertx.setPeriodic(1000,