Improve join retries delay interval in video sdk#1651
Improve join retries delay interval in video sdk#1651aleksandar-apostolov merged 3 commits intodevelopfrom
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt`:
- Around line 571-574: The delay call runs even after the final failed join
attempt because delay((retryCount - 1) * 1000L) is executed unconditionally;
update the logic so the delay is only executed when another retry will occur
(e.g., guard the delay with a condition like retryCount < maxRetries or move the
delay inside the retry branch), referencing the retryCount variable and the
existing delay((retryCount - 1) * 1000L) expression in the Call.kt join routine
so no wait happens after the last attempt.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 734341a3-d99d-4462-9d2d-aaa635fe579d
📒 Files selected for processing (1)
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt
aleksandar-apostolov
left a comment
There was a problem hiding this comment.
LGTM — operator precedence fix is correct and needed.
Agree with CodeRabbit's observation about the unnecessary 2s delay after the final failed attempt. Not a blocker for this PR, but worth addressing as a follow-up.
|
|
🚀 Available in v1.22.0 |




Goal
Improve join-retries delay interval
The mathematical operation inside delay was wrong
Implementation
Corrected the operation inside delay
🎨 UI Changes
None
Testing
None
Summary by CodeRabbit