Skip to content

Conversation

@iosDeveloperDenis
Copy link

@iosDeveloperDenis iosDeveloperDenis commented Jan 15, 2026

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

@iosDeveloperDenis iosDeveloperDenis self-assigned this Jan 15, 2026
@iosDeveloperDenis iosDeveloperDenis changed the base branch from master to dev January 15, 2026 13:06
Copy link
Collaborator

@fmorau fmorau left a comment

Choose a reason for hiding this comment

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

👍

@fmorau fmorau requested a review from Copilot January 28, 2026 08:29
@fmorau
Copy link
Collaborator

fmorau commented Jan 28, 2026

@codex review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 peerConnectionClose to 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants