Skip to content

Commit

Permalink
fix(ICE): treat completed as connected
Browse files Browse the repository at this point in the history
When WebRTC ICE gathering policy is set to gather once instead of continually, the controlling agent goes to completed instead of connected (no more candidates to check). This doesn't happen in Chrome or other browsers, but is reproducible with node.js wrapper around WebRTC which runs with the default settings.

This is causing a bug where the initiator side of a P2P connection does not fully switch to P2P mode and keeps on sending data on both P2P and JVB connections.
  • Loading branch information
paweldomas committed Aug 8, 2024
1 parent 03eef6d commit 6b5e844
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/xmpp/JingleSessionPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ export default class JingleSessionPC extends JingleSession {
this._iceCheckingStartedTimestamp = now;
break;
case 'connected':
case 'completed':
// Informs interested parties that the connection has been restored. This includes the case when
// media connection to the bridge has been restored after an ICE failure by using session-terminate.
if (this.peerconnection.signalingState === 'stable') {
Expand Down

0 comments on commit 6b5e844

Please sign in to comment.