Skip to content

[FEAT] 바이낸스 api 재연결 기능 추가 - #90

Merged
moonwhistle merged 2 commits into
masterfrom
feat/#89
Aug 13, 2026
Merged

[FEAT] 바이낸스 api 재연결 기능 추가#90
moonwhistle merged 2 commits into
masterfrom
feat/#89

Conversation

@moonwhistle

@moonwhistle moonwhistle commented Aug 13, 2026

Copy link
Copy Markdown
Owner

📌 Summary

바이낸스 api 24시간 후 자동으로 끊기는 문제로 인해 23시간 50분에 재연결 기능 추가
예외처리 시 연결 복구 기능 추가

📚 Changes

📝 Note

📌 Related Issue

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
coin-flow Ready Ready Preview Aug 13, 2026 1:39am

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@moonwhistle, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 110 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 46007c32-dc3c-403e-b42f-c18b92195942

📥 Commits

Reviewing files that changed from the base of the PR and between 0254e7a and 59d84bc.

📒 Files selected for processing (1)
  • backend/coinflow-collector-app/src/main/java/com/coinflow/client/binance/BinanceWebSocketClient.java
📝 Walkthrough

Walkthrough

Binance WebSocket 클라이언트가 단일 연결 방식에서 재연결 관리 방식으로 변경되었습니다. 클라이언트는 현재 연결과 연결 상태를 추적합니다. 서버 종료 이벤트, 연결 종료, 오류 발생 시 지수 백오프와 지터를 사용해 재연결합니다. 연결 성공 후 약 23시간 50분 뒤 선제적 재연결을 예약합니다. disconnect()는 연결과 예약 작업을 중단합니다. 오래된 클라이언트의 콜백은 재연결을 시작하지 않습니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: 🟠 High · up to 0254e

재연결 로직이 이전 WebSocket의 늦은 콜백과 대기 중인 재연결 작업을 차단하지 않아 정상 연결이 예기치 않게 교체되거나 종료될 수 있습니다. 이로 인해 실시간 데이터 수집이 중단될 수 있으므로, 현재 상태로는 병합 전에 수명주기 검증과 예약 작업 취소를 보완해야 합니다.

Sequence Diagram(s)

sequenceDiagram
  participant BinanceWebSocketClient
  participant WebSocketClient
  participant ScheduledExecutorService

  BinanceWebSocketClient->>WebSocketClient: 연결 생성
  WebSocketClient-->>BinanceWebSocketClient: 연결 성공
  BinanceWebSocketClient->>ScheduledExecutorService: 선제적 재연결 예약
  WebSocketClient-->>BinanceWebSocketClient: 서버 종료 또는 오류 전달
  BinanceWebSocketClient->>ScheduledExecutorService: 백오프 재연결 예약
  ScheduledExecutorService->>BinanceWebSocketClient: 재연결 실행
  BinanceWebSocketClient->>WebSocketClient: 기존 클라이언트 종료
  BinanceWebSocketClient->>WebSocketClient: 새 클라이언트 연결
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed 구현이 이슈 #89의 Binance API 재연결 기능 요구사항을 충족합니다.
Out of Scope Changes check ✅ Passed 변경 사항은 Binance WebSocket 연결 종료, 오류 복구, 선제적 재연결 범위에 포함됩니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed 제목은 Binance API의 재연결 기능 추가라는 주요 변경 사항을 명확하게 설명합니다.
Description check ✅ Passed 설명은 Binance API의 자동 재연결과 예외 발생 시 연결 복구 변경 사항을 직접 설명합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#89

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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
`@backend/coinflow-collector-app/src/main/java/com/coinflow/client/binance/BinanceWebSocketClient.java`:
- Around line 73-76: Update BinanceWebSocketClient.onOpen so it acquires
lifecycleLock and proceeds only when not stopped and client == this; only then
reset reconnect state and call scheduleProactiveReconnect. Store the delayed
reconnect ScheduledFuture and cancel and clear it when the current client opens,
preventing stale queued reconnects from replacing the active connection.

Apply the same fix in
`@backend/coinflow-collector-app/src/main/java/com/coinflow/client/binance/BinanceWebSocketClient.java`
around lines 74 - 75: The same stale-callback and uncancelled-reconnect-task
race is covered by the consolidated comment.
🪄 Autofix

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: 243b6eeb-15a7-496b-af44-7b72bdf8dbce

📥 Commits

Reviewing files that changed from the base of the PR and between 3acd992 and 0254e7a.

📒 Files selected for processing (1)
  • backend/coinflow-collector-app/src/main/java/com/coinflow/client/binance/BinanceWebSocketClient.java

@moonwhistle
moonwhistle merged commit 0c96385 into master Aug 13, 2026
5 checks passed
@moonwhistle
moonwhistle deleted the feat/#89 branch August 13, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 바이낸스 api 재연결 기능 추가

1 participant