File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/kotlin/infrastructure/api Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class OrdApiGatewayVerticle(
4242 router.post(" $endpoint /stop-custom-automation-scenario" ).handler(StopCustomScenarioHandler (this .vertx))
4343 router.post(" $endpoint /adapt-environment" ).handler(AdaptEnvironmentHandler (this .vertx))
4444
45- router.get(" socket-connection" ).handler {
45+ router.get(" $endpoint / socket-connection" ).handler {
4646 it.request().toWebSocket().onSuccess { webSocket ->
4747 webSocket.accept()
4848 webSockets.add(webSocket)
@@ -51,7 +51,9 @@ class OrdApiGatewayVerticle(
5151
5252 this .vertx.eventBus().consumer(Topics .automationProposalsEventsTopic) { message ->
5353 val event = Json .decodeFromString<ProcessEvent <MedicalTechnologyAutomationProposalEvent >>(message.body())
54- webSockets.firstOrNull()?.writeTextMessage(Json .encodeToString(event.data))
54+ webSockets.forEach {
55+ it.writeTextMessage(Json .encodeToString(event.data))
56+ }
5557 }
5658
5759 vertx.createHttpServer()
You can’t perform that action at this time.
0 commit comments