mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Return typed error when no candidate pairs
Returning a typed error allows us to handle it gracefully in pions/webrtc
This commit is contained in:
@@ -796,7 +796,7 @@ func (a *Agent) getBestPair() (*candidatePair, error) {
|
||||
out := <-res
|
||||
|
||||
if out == nil {
|
||||
return nil, errors.New("no Valid Candidate Pairs Available")
|
||||
return nil, ErrNoCandidatePairs
|
||||
}
|
||||
|
||||
return out, nil
|
||||
|
||||
Reference in New Issue
Block a user