Expose ErrUnknownCandidateTyp

Expose this error so pion/webrtc can handle gracefully.
rfc8839#section-5.1 specifies that a WebRTC Agent MUST
ignore any name/value pairs it doesn't understand.

Relates to pion/webrtc#1949
This commit is contained in:
Sean DuBois
2021-12-15 12:13:30 -05:00
parent 9caf4e113d
commit e9caba4e03
2 changed files with 4 additions and 2 deletions

View File

@@ -109,6 +109,9 @@ var (
// ErrTCPRemoteAddrAlreadyExists indicates we already have the connection with same remote addr.
ErrTCPRemoteAddrAlreadyExists = errors.New("conn with same remote addr already exists")
// ErrUnknownCandidateTyp indicates that a candidate had a unknown type value.
ErrUnknownCandidateTyp = errors.New("unknown candidate typ")
errSendPacket = errors.New("failed to send packet")
errAttributeTooShortICECandidate = errors.New("attribute not long enough to be ICE candidate")
errParseComponent = errors.New("could not parse component")
@@ -116,7 +119,6 @@ var (
errParsePort = errors.New("could not parse port")
errParseRelatedAddr = errors.New("could not parse related addresses")
errParseTypType = errors.New("could not parse typtype")
errUnknownCandidateTyp = errors.New("unknown candidate typ")
errGetXorMappedAddrResponse = errors.New("failed to get XOR-MAPPED-ADDRESS response")
errConnectionAddrAlreadyExist = errors.New("connection with same remote address already exists")
errReadingStreamingPacket = errors.New("error reading streaming packet")