skip empty ICE candidates
This commit is contained in:
@@ -238,6 +238,11 @@ func Dial(rawURL string) (*Client, error) {
|
|||||||
|
|
||||||
iceCandidate := msg.ToJSON()
|
iceCandidate := msg.ToJSON()
|
||||||
|
|
||||||
|
// skip empty ICE candidates
|
||||||
|
if iceCandidate.Candidate == "" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
icePayload := map[string]interface{}{
|
icePayload := map[string]interface{}{
|
||||||
"ice": iceCandidate.Candidate,
|
"ice": iceCandidate.Candidate,
|
||||||
"mlineindex": iceCandidate.SDPMLineIndex,
|
"mlineindex": iceCandidate.SDPMLineIndex,
|
||||||
@@ -425,6 +430,12 @@ func Dial(rawURL string) (*Client, error) {
|
|||||||
return
|
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 {
|
if err = prod.AddCandidate(msg.Body.Ice); err != nil {
|
||||||
client.Stop()
|
client.Stop()
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user