From 3c080e8a924bbdaeca4e98ffef40cf8a8ae9fc11 Mon Sep 17 00:00:00 2001 From: zhngs Date: Sun, 3 Sep 2023 20:57:50 +0800 Subject: [PATCH] Fix incorrect ice-lite comment The lite agent is controlled, not controlling. --- peerconnection.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peerconnection.go b/peerconnection.go index 989a3b96a14..bba586786a5 100644 --- a/peerconnection.go +++ b/peerconnection.go @@ -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 { @@ -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) {