Skip to content
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

[FIX]: 인게임 구독 중첩 안되도록 수정 #315

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

dlsxjzld
Copy link
Contributor

@dlsxjzld dlsxjzld commented Apr 4, 2024

📋 Issue Number

close #308

💻 구현 내용

  • 연속적으로 게임 진행시 인게임웹소켓 구독이 중첩되는 것을 방지하도록 수정했습니다.
  • StompJs 공식문서를 참조해서 인게임이 종료되면 unsubscribe을 하도록 구현

📷 Screenshots

스크린샷 2024-04-04 오후 9 33 38
  • 현재 게임을 연속으로 해도 더이상 중첩되지 않습니다.

🤔 고민사항

@dlsxjzld dlsxjzld added the fix 수정사항 label Apr 4, 2024
@dlsxjzld dlsxjzld self-assigned this Apr 4, 2024
Copy link
Member

@yejinleee yejinleee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StompSubscription의 반환값으로부터 취소를 해야했군요 ,, 역시 문서 👍

수고하셨어요 !!

src/pages/GamePage/hooks/useWebsocket.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@loevray loevray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!ㅎㅎ
역시 공식문서가 답이었군요
간단하게 unsubscribe하면된다고 써있다니...ㅎㅎㅋㅋㅋ

@dlsxjzld dlsxjzld merged commit 2b8f63d into main Apr 5, 2024
1 check passed
@dlsxjzld dlsxjzld deleted the fix-#308-websocketNesting branch April 5, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 수정사항
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] 웹소켓 쌓임 현상 해결
3 participants