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
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.
I read RFCs for ICE and ICE Trickle, and found that they do not specify how candidate pair should be nominated, so this is up to pion to decide and it may work correctly.
I also found that pion has SettingEngine.timeout.ICEPrflxAcceptanceMinWait option (set to 0 by default), but looks that it does not work properly - I set it to 1 second for testing and I still see that peer reflexive candidate is selected.
Your environment.
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
The text was updated successfully, but these errors were encountered: