diff --git a/modules/ws/src/main/scala/de/nowchess/ws/resource/GameWebSocketResource.scala b/modules/ws/src/main/scala/de/nowchess/ws/resource/GameWebSocketResource.scala index 870d63d..8dbc7b0 100644 --- a/modules/ws/src/main/scala/de/nowchess/ws/resource/GameWebSocketResource.scala +++ b/modules/ws/src/main/scala/de/nowchess/ws/resource/GameWebSocketResource.scala @@ -66,9 +66,9 @@ class GameWebSocketResource: @OnOpen def onOpen(connection: WebSocketConnection): Unit = activeGauge - val gameId = connection.pathParam("gameId") - val handler: Consumer[String] = msg => connection.sendText(msg).subscribe().`with`(_ => (), _ => ()) - val subscriber = redis.pubsub(classOf[String]).subscribe(s2cTopic(gameId), handler) + val gameId = connection.pathParam("gameId") + val handler: Consumer[String] = msg => connection.sendText(msg).subscribe().`with`(_ => (), _ => ()) + val subscriber = redis.pubsub(classOf[String]).subscribe(s2cTopic(gameId), handler) connections.put(connection.id(), ConnectionMeta(gameId, subscriber, None)) connectionsOpened.increment() pendingAuth.add(connection.id())