Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix]SetPublisher track setUp race condition #586

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

ipavlidakis
Copy link
Collaborator

@ipavlidakis ipavlidakis commented Oct 29, 2024

🔗 Issue Links

Resolves https://stream-io.atlassian.net/browse/PBE-6301

📝 Summary

In some cases, a race condition was hit, where Publisher setUp hasn't completed when the negotiation was executing. That resulted in SetPublisherRequest tracks being empty.

🛠 Implementation

Before negotiation, we add a small expectation (setUp must complete before proceeding) and allowing a 2 seconds waiting time for it.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should receive manual QA
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (Docusaurus, tutorial, CMS)

@ipavlidakis ipavlidakis added the bug Something isn't working label Oct 29, 2024
@ipavlidakis ipavlidakis self-assigned this Oct 29, 2024
@ipavlidakis ipavlidakis requested a review from a team as a code owner October 29, 2024 22:01
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Oct 29, 2024

SDK Size

title develop branch diff status
StreamVideo 7.44 MB 7.44 MB +1 KB 🟢
StreamVideoSwiftUI 2.18 MB 2.18 MB 0 KB 🟢
StreamVideoUIKit 2.31 MB 2.31 MB 0 KB 🟢
StreamWebRTC 8.69 MB 8.69 MB 0 KB 🟢

@ipavlidakis ipavlidakis force-pushed the fix/set-publisher-race-condition branch from 04795f6 to 834649d Compare October 30, 2024 11:06
Copy link
Collaborator

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

Looks good to me ✅ We just need to remove that commented out code.

// update.supportsGrouping = true
// update.supportsHolding = true
// update.supportsUngrouping = true
// update.supportsGrouping = true
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we delete this code?

@ipavlidakis ipavlidakis force-pushed the fix/set-publisher-race-condition branch from bdd3002 to c52ca4c Compare October 30, 2024 15:01
@ipavlidakis ipavlidakis force-pushed the fix/set-publisher-race-condition branch from c52ca4c to b72402a Compare October 30, 2024 15:02
Copy link

sonarcloud bot commented Oct 30, 2024

@ipavlidakis ipavlidakis enabled auto-merge (squash) October 30, 2024 15:41
@ipavlidakis ipavlidakis merged commit 48ac73c into develop Oct 30, 2024
13 checks passed
@ipavlidakis ipavlidakis deleted the fix/set-publisher-race-condition branch October 30, 2024 16:02
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants