Skip to content

Conversation

@aleksandar-apostolov
Copy link
Contributor

@aleksandar-apostolov aleksandar-apostolov commented Oct 23, 2025

Goal

AND-869

Fix a race condition where removeClient would not be finished before calling a new build() causing an exception.

Implementation

Add a synchronized block on the remove same as install.
Ensure that instance is cleared before calling cleanup.
Cleanup is then called on the previous instance regardless of weather a new instance will be created or not.

Testing

Reproduced with a unit test. Covered the scenario with a test.

@aleksandar-apostolov aleksandar-apostolov requested a review from a team as a code owner October 23, 2025 10:49
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

@aleksandar-apostolov aleksandar-apostolov changed the title Fix a race condition with StreamVideo.removeClient() [AND-869] Fix a race condition with StreamVideo.removeClient() Oct 23, 2025
@aleksandar-apostolov aleksandar-apostolov changed the title [AND-869] Fix a race condition with StreamVideo.removeClient() Fix a race condition with StreamVideo.removeClient() Oct 23, 2025
@aleksandar-apostolov aleksandar-apostolov added the pr:bug Fixes a bug label Oct 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-video-android-core 11.74 MB 11.74 MB 0.00 MB 🟢
stream-video-android-ui-xml 5.68 MB 5.68 MB 0.00 MB 🟢
stream-video-android-ui-compose 6.27 MB 6.27 MB 0.00 MB 🟢

Copy link
Contributor

@rahul-lohra rahul-lohra left a comment

Choose a reason for hiding this comment

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

lgtm

@aleksandar-apostolov aleksandar-apostolov enabled auto-merge (squash) October 24, 2025 09:17
@sonarqubecloud
Copy link

@aleksandar-apostolov aleksandar-apostolov merged commit 25f86df into develop Oct 24, 2025
11 of 12 checks passed
@aleksandar-apostolov aleksandar-apostolov deleted the remove-client-race-condition branch October 24, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bug Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants