Skip to content

Commit

Permalink
Hotfix/#1 sse connect (#164)
Browse files Browse the repository at this point in the history
* fix: 게임 종료시 sse connect 유지

* fix: 게임 상태 delete event 송신하지 않게 수정
  • Loading branch information
waterricecake authored Dec 22, 2024
1 parent 4ad0bd1 commit 0cb1952
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public void listenDeleteGameEvent(final DeleteGameEvent deleteGameEvent) {
chatRepository.deleteById(code);
voteRepository.deleteById(code);
sendStatusChangeEventToSseClient(code, StatusType.WAIT);
sseEventPublisher.disconnectSseByCode(code);
gameRepository.deleteById(code);

final Lobby room = lobbyRepository.findById(code)
Expand Down Expand Up @@ -141,6 +140,9 @@ public void listenDeleteLobbyEvent(final DeleteLobbyEvent deleteLobbyEvent) {

@EventListener
public void listenGameStatusChangeEvent(final GameStatusChangeEvent gameStatusChangeEvent) {
if (gameStatusChangeEvent.statusType().equals(StatusType.DELETED)) {
return;
}
sendStatusChangeEventToSseClient(gameStatusChangeEvent.code(), gameStatusChangeEvent.statusType());
}

Expand Down

0 comments on commit 0cb1952

Please sign in to comment.