-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRAW-412 이미 게임중인 유저 중복 참여 방지 #16
base: feature/DRAW-347
Are you sure you want to change the base?
Conversation
if (gameInfo.room.isRandomMatching) { | ||
for (player in gameInfo.room.players) { | ||
val session = sessionManager.getSession(player.userId) ?: continue | ||
session.origin.close() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3
sessionManager.unregisterSession(session.id) 로직도 추가하면 좋을 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
세션 끊김 공통 부분이 실행되어 해당 파트에서 처리됩니다
afterConnect(sessionDto) | ||
} catch (ex: XorkerException) { | ||
webSocketExceptionHandler.handleXorkerException(session, RequestAction.INIT, ex) | ||
throw ex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P4
예외 공통 응답 처리는 안 해도 괜찮은 걸까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw는 세션을 끊김 위해 던지는 것으로
공통 응답처리는 63번째 라인이 하고 있습니다
@@ -20,6 +20,7 @@ data object AlreadyJoinRoomException : ClientException("c005", "이미 참여한 | |||
data object InvalidRequestOnlyMyTurnException : ClientException("c006", "요청자의 차례가 아니라서 처리 불가능") { private fun readResolve(): Any = InvalidRequestOnlyMyTurnException } | |||
data object InvalidRequestOtherPlayingException : ClientException("c007", "진행 중인 게임 방이 있습니다.") { private fun readResolve(): Any = InvalidRequestOtherPlayingException } | |||
data object AlreadyPlayingRoomException : ClientException("c008", "진행 중인 게임 방에는 참여할 수 없습니다.") { private fun readResolve(): Any = AlreadyPlayingRoomException } | |||
data object AlreadyPlayingPlayerException : ClientException("c010", "한 유저가 여러번 접속 시도를 하고 있습니다.") { private fun readResolve(): Any = AlreadyPlayingRoomException } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1
readResolve() 반환 값에 다른 예외가 지정되어 있습니다.
Related Jira ✔
Description ✔
PR Rule ✔
P1: 꼭 반영해주세요 (Request changes)
P2: 적극적으로 고려해주세요 (Request changes)
P3: 웬만하면 반영해 주세요 (Comment)
P4: 반영해도 좋고 넘어가도 좋습니다 (Approve)
P5: 그냥 사소한 의견입니다 (Approve)