[Fix/#308] CameraPreview 표시 중 Heartbeat 중복 처리를 방지한다. #309
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.
🔗 연관된 이슈
📝 작업 내용
📌 요약
CameraPreview의 알럿과 ConnectionCheckView의 pop이 동시에 동작하면서 알럿이 중복으로 출력되며
샤샤샥사라지는 버그를 해결했습니다.🔍 상세
문제 상황 재현을 위해 아래와 같이
시나리오를 산정했습니다.촬영기기(iPhone)에서 미러링 기기를 연결하거나 미러링/리모트 기기를 연결한 후ConnectionCheckView로 이동합니다.CameraPreview를fullScreenCover로 띄웁니다.연결을 끊습니다.CameraPreview에서 "연결이 끊어졌습니다." 알럿과 함께 홈으로 이동해야합니다.핵심 문제는
CameraPreview를fullScreenCover로 띄우면 ConnectionCheckView는dismiss되지 않고 그 아래에 살아있다는 점이었습니다.그러다보니
Heatbeat타임아웃 발생 시 브라우저의 모든 이벤트 스트림을 관리하는BrowserStreamManager가 모든 하트비트 스트림에.heartbeatTimeout이벤트를 방출합니다.이때, ConnectionCheckStore와 CameraPreviewStore가
동시에 이벤트를 수신해서 문제가 발생되고 있었습니다.isMirroringDisconnected를true로 변경하여 View에서router.pop()실행isMirroringDisconnected를true로 변경하여 알럿 표시 후router.reset()실행이렇게 동시에 이벤트를 수신해버리니
CamerePreview의 알럿은 잠깐 보였다가 fullScreenCorver가 dismiss되면서 슈슈슉 사라집니다. 동시에ConnectionCheckView의router.pop도 실행되어 BrowsingView로 돌아가버려 네비게이션의 충돌이 발생하고 있었습니다.이를 해결하기 위해 간단히
guard문을 추가하여ConnectionCheckView가CamerePreview를 표시하고 있을 때는Heartbeat반응을 건너뛰도록 했습니다.📸 영상 / 이미지 (Optional)
개선 전
2.mov
개선 후
2.mov