Fix: WebRTC 상호작용 문제 해결 (#264) #270
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📌 개요
WebRTC 화상 채팅 기능의 안정성과 유지보수성을 향상시키기 위해 WebSocket 기반 시그널링 서버의 핵심 로직을 개선하고 정책을 명확히 수립했습니다.
🔨 작업 내용
WebRTC 시그널링 방식을 방 전체 토픽(Broadcast)으로 변경
Offer,Answer,ICE Candidate등 모든 WebRTC 시그널을 기존에 고려했던 개인 큐 방식이 아닌,/topic/room/{roomId}/webrtc주소로 브로드캐스트하도록 통일했습니다.에러 처리 로직 개선
/user/queue/errors)로 에러를 전송하도록 수정했습니다.미디어 상태 변경 DTO 명세 명확화
WebRTCMediaToggleRequest의 데이터 불일치 문제를 사전에 방지했습니다.테스트 코드 수정
WebSocketMessageControllerTest와WebRTCSignalingControllerTest의 관련 테스트 케이스를 수정 및 보완했습니다.🔗 관련 이슈
Closes #264
📝 참고 사항
시그널링 방식을 브로드캐스트로 선택한 이유
convertAndSendToUser) 방식은 서버가 메시지를 보낼 대상(principal.getName())과 클라이언트가 지정한 대상(userId)의 식별자 불일치 문제, 그리고 세션 매핑 타이밍 이슈 등 실패 지점이 많아 안정성이 떨어질 수 있습니다.✅ 체크리스트