skip empty ICE candidates
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user