mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 09:24:08 +00:00
Ignore parse addr error when add remote candidate (#4264)
This commit is contained in:
@@ -2389,7 +2389,10 @@ func (t *PCTransport) handleRemoteICECandidate(e event) error {
|
||||
|
||||
if err := t.pc.AddICECandidate(*c); err != nil {
|
||||
t.params.Logger.Warnw("failed to add ICE candidate", err, "candidate", c)
|
||||
return errors.Wrap(err, "add ice candidate failed")
|
||||
// ignore ParseAddr error as it does not affect ICE connectivity
|
||||
if !strings.Contains(err.Error(), "ParseAddr") {
|
||||
return errors.Wrap(err, "add ice candidate failed")
|
||||
}
|
||||
} else {
|
||||
t.params.Logger.Debugw("added ICE candidate", "candidate", c)
|
||||
}
|
||||
|
||||
@@ -446,5 +446,5 @@ func IsICECandidateMDNS(candidate ice.Candidate) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
return strings.HasSuffix(candidate.Address(), ".local")
|
||||
return strings.HasSuffix(candidate.Address(), ".local") || strings.HasSuffix(candidate.Address(), ".invalid")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user