Skip to content

Commit 6d97823

Browse files
committed
♻️ refactor: PLAYER_LIST와 SYSTEM_NOTICE 동기화
1 parent 39cdc3d commit 6d97823

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

backend/src/main/java/io/f1/backend/domain/game/app/GameService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ public void gameEnd(Room room) {
179179

180180
if (!disconnectedPlayers.isEmpty()) {
181181
roomService.handleDisconnectedPlayers(room, disconnectedPlayers);
182+
} else {
183+
messageSender.sendBroadcast(
184+
destination, MessageType.PLAYER_LIST, toPlayerListResponse(room));
182185
}
183186

184-
messageSender.sendBroadcast(
185-
destination, MessageType.PLAYER_LIST, toPlayerListResponse(room));
186187

187188
room.updateRoomState(RoomState.WAITING);
188189

backend/src/main/java/io/f1/backend/domain/game/app/RoomService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ public void exitRoomForDisconnectedPlayer(Long roomId, Player player, String ses
340340

341341
messageSender.sendBroadcast(
342342
destination, MessageType.SYSTEM_NOTICE, systemNoticeResponse);
343+
messageSender.sendBroadcast(
344+
destination, MessageType.PLAYER_LIST, toPlayerListResponse(room));
343345
}
344346
}
345347

0 commit comments

Comments
 (0)