Repository navigation
Mute sync resume no longer races the media replay - #1844
Conversation
resumeMuteSync flushed the tracks skipped while the SFU was being torn down, then connectRtc restarted listenToMediaChanges and its collectLatest replay re-signalled the same tracks milliseconds later. The same-track job coalescing cancelled the flush mid-request, logging IOException: Canceled - the symptom the gate was added to remove. The replay already re-signals camera, microphone and screen-share on the only path that reaches the flush, so resume now just re-opens the gate and pendingMuteSyncTracks goes away with it. Closes AND-1549
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. WalkthroughThe change removes deferred mute-sync track storage. ChangesMute sync lifecycle
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Mute sync now reopens safely and relies on reconnect media replay to update current track state. The reported tests pass, so the change is mergeable. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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. A rabbit saw the mute gate glow Comment |
…resume-flush-races-replay
|
|
🚀 Available in v1.36.0 |


Goal
Fixes AND-1549
Follow-up to #1796.
Implementation
resumeMuteSync()only re-opens themuteSyncEnabledgate. ThelistenToMediaChanges()collectLatestreplay is the single path that re-signals tracks after reconnect.pendingMuteSyncTracksand its bookkeeping insyncMuteStateToSfu(),cleanup()and
cancelActiveWork().post to a torn-down SFU.
Net -41 lines. No public API change.
Testing
./gradlew :stream-video-android-core:testDebugUnitTest— 1270 passed, 0 failed./gradlew :stream-video-android-core:spotlessCheck :stream-video-android-core:apiCheckRtcSessionTest2gainsmute sync resumes without replaying the tracks it skipped—verified it fails when the flush is reinstated.
Summary by CodeRabbit