You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an application which uses pion ice for connectivity & candidate gathering with coturn.
What did you expect?
I expected that GetSelectedCandidatePair() func would return err if selectedPair is nil, but it doesn't, it returns nil pairs and nil error.
What happened?
In my code, I had written this line:
`
// the ice connection has been established successfully we are ready to start the proxy
pair, err := conn.agent.GetSelectedCandidatePair()
if err != nil {
return errors.Wrapf(err, "failed to get selected candidate pairs for %s", conn.config.RemoteId)
}
localCandidate := pair.Local.Address()
remoteCandidate := pair.Remote.Address()
...
`
Here I was only checking if err is nil, then it returned, but in this case, it returned error as nil, and pair as nil as well. Which failed the next line.
Although, it can be seen as a flaw in my code, but I think it should return error in case pairs are nil.
The text was updated successfully, but these errors were encountered:
Your environment
What did you do?
We have an application which uses pion ice for connectivity & candidate gathering with coturn.
What did you expect?
I expected that GetSelectedCandidatePair() func would return err if selectedPair is nil, but it doesn't, it returns nil pairs and nil error.
What happened?
In my code, I had written this line:
`
// the ice connection has been established successfully we are ready to start the proxy
pair, err := conn.agent.GetSelectedCandidatePair()
`
Here I was only checking if err is nil, then it returned, but in this case, it returned error as nil, and pair as nil as well. Which failed the next line.
Although, it can be seen as a flaw in my code, but I think it should return error in case pairs are nil.
The text was updated successfully, but these errors were encountered: