mirror of
https://github.com/livekit/livekit.git
synced 2026-06-04 23:52:06 +00:00
Panic fix for nil candidate check. (#2957)
This commit is contained in:
@@ -345,5 +345,10 @@ func IsCandidateMDNS(candidate webrtc.ICECandidateInit) bool {
|
||||
}
|
||||
|
||||
func IsICECandidateMDNS(candidate ice.Candidate) bool {
|
||||
if candidate == nil {
|
||||
// end-of-candidates candidate
|
||||
return false
|
||||
}
|
||||
|
||||
return strings.HasSuffix(candidate.Address(), ".local")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user