File tree 1 file changed +4
-2
lines changed
src/main/kotlin/infrastructure/api
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class OrdApiGatewayVerticle(
42
42
router.post(" $endpoint /stop-custom-automation-scenario" ).handler(StopCustomScenarioHandler (this .vertx))
43
43
router.post(" $endpoint /adapt-environment" ).handler(AdaptEnvironmentHandler (this .vertx))
44
44
45
- router.get(" socket-connection" ).handler {
45
+ router.get(" $endpoint / socket-connection" ).handler {
46
46
it.request().toWebSocket().onSuccess { webSocket ->
47
47
webSocket.accept()
48
48
webSockets.add(webSocket)
@@ -51,7 +51,9 @@ class OrdApiGatewayVerticle(
51
51
52
52
this .vertx.eventBus().consumer(Topics .automationProposalsEventsTopic) { message ->
53
53
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
+ }
55
57
}
56
58
57
59
vertx.createHttpServer()
You can’t perform that action at this time.
0 commit comments