Skip to content

Commit

Permalink
Fix incorrect ice-lite comment
Browse files Browse the repository at this point in the history
The lite agent is controlled, not controlling.
  • Loading branch information
zhngs authored and Sean-Der committed Sep 3, 2023
1 parent b501cb5 commit 3c080e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions peerconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ func (pc *PeerConnection) CreateAnswer(*AnswerOptions) (SessionDescription, erro
if connectionRole == sdp.ConnectionRole(0) {
connectionRole = connectionRoleFromDtlsRole(defaultDtlsRoleAnswer)

// If one of the agents is lite and the other one is not, the lite agent must be the controlling agent.
// If one of the agents is lite and the other one is not, the lite agent must be the controlled agent.
// If both or neither agents are lite the offering agent is controlling.
// RFC 8445 S6.1.1
if isIceLiteSet(remoteDesc.parsed) && !pc.api.settingEngine.candidates.ICELite {
Expand Down Expand Up @@ -1185,7 +1185,7 @@ func (pc *PeerConnection) SetRemoteDescription(desc SessionDescription) error {
}

iceRole := ICERoleControlled
// If one of the agents is lite and the other one is not, the lite agent must be the controlling agent.
// If one of the agents is lite and the other one is not, the lite agent must be the controlled agent.
// If both or neither agents are lite the offering agent is controlling.
// RFC 8445 S6.1.1
if (weOffer && remoteIsLite == pc.api.settingEngine.candidates.ICELite) || (remoteIsLite && !pc.api.settingEngine.candidates.ICELite) {
Expand Down

0 comments on commit 3c080e8

Please sign in to comment.