-
Couldn't load subscription status.
- Fork 182
Description
Your environment.
- Version: pion v3.1.60, pion/ice v2.3.2
What did you do?
Two pion-based peers establish WebRTC connection with ICE trickle enabled.
What did you expect?
When both peers are on the same network (especially in tests where both are in the same process), both of them selects host-host pair as a best one and reports it via peer.SCTP().Transport().ICETransport().OnSelectedCandidatePairChange() callback. I am interested in last reported pair.
What happened?
When ICE trickle is enabled, there is race condition between ICE candidate sent via websocket and STUN request. When latter one arrives first, pion/ice selects host-prflx pair as a best one and reports it via callback mentioned above.
My code differentiated between direct host-host connections and other ones, so sometimes it works incorrectly.
Related part of ICE Trickle RFC: https://www.rfc-editor.org/rfc/rfc8838#section-11-2.4.2.1