Add logging for server subscriptions in ServerMessageService
This commit is contained in:
1 parent
8a61d35e63
commit
bd6174dd23
2 files changed
+4
-1
No files matched your search
+1
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user