skip empty ICE candidates

This commit is contained in:
seydx
2025-01-24 12:47:25 +01:00
parent 485448cbc7
commit 17bba4d4a2
+11
View File
@@ -238,6 +238,11 @@ func Dial(rawURL string) (*Client, error) {
iceCandidate := msg.ToJSON()
// skip empty ICE candidates
if iceCandidate.Candidate == "" {
return
}
icePayload := map[string]interface{}{
"ice": iceCandidate.Candidate,
"mlineindex": iceCandidate.SDPMLineIndex,
@@ -425,6 +430,12 @@ func Dial(rawURL string) (*Client, error) {
return
}
// check for empty ICE candidate
if msg.Body.Ice == "" {
println("Received empty ICE candidate")
continue
}
if err = prod.AddCandidate(msg.Body.Ice); err != nil {
client.Stop()
return