Connectivity/ICE: First call occasionnally fails if a peer is in a remote location (e.g. Europe)
Scenario
- IPv4 only
- No UPNP
- TURN (only receiver)
- Alice in North America. Bob in Europe
- Alice call Bob
Current result
- Sometimes first call doesn't work (ICE nego failed), but second call works. Like TURN doesn't allow Alice fast enough and the connection (but authorized for second connection)
Advancement
In fact the is two reason I can see:
- One side can stop negotiating too soon (just check its candidate, but the other one succeed a candidate after this). We should let some time to the ICE negotiation to be sure to not fail
- on_connect_complete in stun_sock MUST handle status != success. Now it just fail and don't retry candidate when necessary like other connections.
Fixed by https://git.jami.net/savoirfairelinux/ring-daemon/-/commit/4463ed9eeb66c4c30b2b98e8cdd05ba5843349f9