Add logging for server subscriptions in ServerMessageService

This commit is contained in:
2026-08-22 22:40:18 +02:00
parent 8a61d35e63
commit bd6174dd23
2 changed files with 4 additions and 1 deletions
@@ -27,6 +27,7 @@ public class ServerMessageService {
public synchronized SseEmitter subscribe(String server) {
servers.add(server);
log.info("Server {} subscribed", server);
SseEmitter emitter = eventPublisher.subscribe(server, this::handleSessionEnd);
if (latestPlayerState != null) {
eventPublisher.sendToUser(server, PLAYER_STATE_CHANNEL, latestPlayerState);
@@ -18,7 +18,9 @@ export class UserListComponent {
protected readonly serverState = computed(() => {
const state = this.chatService.serverState();
if (!state) return null;
if (!state) {
return null;
}
return {
servers: [...state.servers]