Skip to content

Commit 866fa5a

Browse files
committed
Replace deprecated SetNat1To1IPs with new SetNat1To1AddressRewriteRules
1 parent 4d8c793 commit 866fa5a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/service/roommanager.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ func NewLocalRoomManager(
165165
for _, lip := range localIPs {
166166
hostCandidateIPs = append(hostCandidateIPs, lip+"/"+lip)
167167
}
168-
rtcConf.SettingEngine.SetNAT1To1IPs(hostCandidateIPs, webrtc.ICECandidateTypeHost)
168+
if err := rtcconfig.SetNAT1To1AddressRewriteRules(&rtcConf.SettingEngine, hostCandidateIPs, webrtc.ICECandidateTypeHost); err != nil {
169+
return nil, errors.Wrap(err, "failed to set ICE address rewrite rules for local IPs")
170+
}
169171
rtcConf.NAT1To1IPs = hostCandidateIPs
170172
logger.Infow("Added local IPs as host candidates for ICE", "hostCandidateIPs", hostCandidateIPs)
171173
}

0 commit comments

Comments
 (0)