Bug/m 2582/user hears participants for a few#25
Merged
Conversation
fmorau
approved these changes
Jan 15, 2026
Collaborator
|
@codex review |
There was a problem hiding this comment.
Pull request overview
This PR addresses a race condition in the WebRTC module where audio session unlocking could occur before peer connection closure is complete. The fix changes peerConnectionClose from an async method to a blocking synchronous method, ensuring proper sequencing of operations during call teardown.
Changes:
- Converted
peerConnectionCloseto a blocking synchronous method to prevent race conditions - Added performance timing instrumentation for peer closing and audio session operations
- Added WebRTC codec logging and callback logger initialization for debugging
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ios/RCTWebRTC/WebRTCModule.m | Added video codec logging and RTCCallbackLogger initialization for diagnostics |
| ios/RCTWebRTC/WebRTCModule.h | Added callbackLogger property declaration |
| ios/RCTWebRTC/WebRTCModule+RTCPeerConnection.m | Changed peerConnectionClose to blocking synchronous method with timing instrumentation |
| ios/RCTWebRTC/WebRTCModule+RTCAudioSession.m | Added timing instrumentation to audio session lock/unlock methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Measure peer closing and audio session code execution
Change method from RCT_EXPORT_METHOD to RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD to escape race condition when unlock audio session run before peer closed