✨ [Feat] 웹소켓 재연결 로직 추가#139
Conversation
♻️ refactor: LSTM 로그 제거
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/java/com/example/scoi/domain/websocket/handler/UpbitTickerHandler.java`:
- Line 38: currentSession은 afterConnectionEstablished에서 기록되고 closeSession에서 읽히므로
스레드 간 가시성이 보장되도록 volatile로 선언하세요. UpbitTickerHandler의 currentSession 필드 선언에
volatile을 추가하고, 다른 로직은 변경하지 마세요.
- Around line 76-80: 전송 오류 시 handleTransportError()와 afterConnectionClosed()에서
DisconnectedEvent가 중복 발행되지 않도록 수정하세요. 두 메서드 중 한 곳에서만 이벤트를 발행하거나,
UpbitTickerHandler의 onDisconnected()/connectWithRetry() 진입부에 동시 재연결을 막는 가드를 추가해
한 번만 실행되도록 보장하세요.
In `@src/main/java/com/example/scoi/domain/websocket/WebsocketConnect.java`:
- Around line 65-68: WebsocketConnect.recover(Exception e)가 최대 재시도 초과 후 로그만 남겨
영구적으로 연결이 끊깁니다. recover에서 주기적 재연결을 재개할 수 있도록 스케줄러 기반 재시도 또는 재연결 트리거를 연동하고, 필요하면
알림·헬스체크 상태도 갱신하여 애플리케이션 재시작 없이 복구되도록 수정하세요.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 90362309-1fa3-44a3-9846-ea7aa6a38db5
📒 Files selected for processing (6)
src/main/java/com/example/scoi/domain/websocket/WebsocketConnect.javasrc/main/java/com/example/scoi/domain/websocket/code/WebsocketErrorCode.javasrc/main/java/com/example/scoi/domain/websocket/event/WebsocketConnectionEvent.javasrc/main/java/com/example/scoi/domain/websocket/exception/WebsocketException.javasrc/main/java/com/example/scoi/domain/websocket/handler/UpbitTickerHandler.javasrc/main/java/com/example/scoi/domain/websocket/service/WebSocketService.java
💤 Files with no reviewable changes (1)
- src/main/java/com/example/scoi/domain/websocket/service/WebSocketService.java
♻️ refactor: LSTM 로그 제거
📍 PR 타입 (하나 이상 선택)
❗️ 관련 이슈 링크
Closed #138
📌 개요
🔁 변경 사항
📸 스크린샷
👀 기타 더 이야기해볼 점
✅ 체크 리스트
Summary by CodeRabbit