Skip to content

Candidate type is not changed from peer-reflexive to host #622

@sirzooro

Description

@sirzooro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions