Commit 4965650
committed
ICE client: always reply to binding requests; upgrade route if better pair succeeds
Previously, binding requests from non-selected pairs were silently
discarded once a candidate pair was nominated. There is no good reason
to ignore them -- the response is cheap and the RFC expects it -- so
remove that guard entirely.
Also allow the controlling side to upgrade to a higher-priority pair
after initial nomination. Under packet loss the relay path can win the
nomination race over a direct path (relay responses bypass the lossy
adapter), leaving the connection on a suboptimal route. Now, if a
higher-priority pair succeeds after selection, it is nominated and
SetSelectedCandidatePair is called again to switch to it.
On the controlled side, the USE-CANDIDATE and nomination guards are
relaxed in the same way, so they honor an upgrade request from the
controlling peer.
The response callback now always transitions pair state (Succeeded or
Failed) before the priority guard. Previously the guard returned early
after clearing m_pPeerRequest but before updating m_nState, leaving
pairs stuck in InProgress with no active request and breaking the
invariant assumed by the binding request handler.1 parent 4bfd2cb commit 4965650
1 file changed
Lines changed: 36 additions & 24 deletions
Lines changed: 36 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1705 | 1705 | | |
1706 | 1706 | | |
1707 | 1707 | | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
1714 | 1708 | | |
1715 | 1709 | | |
1716 | 1710 | | |
| |||
1770 | 1764 | | |
1771 | 1765 | | |
1772 | 1766 | | |
1773 | | - | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
1774 | 1770 | | |
1775 | 1771 | | |
1776 | 1772 | | |
1777 | | - | |
1778 | | - | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
1779 | 1777 | | |
1780 | 1778 | | |
1781 | 1779 | | |
| |||
2334 | 2332 | | |
2335 | 2333 | | |
2336 | 2334 | | |
2337 | | - | |
2338 | | - | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
2339 | 2338 | | |
| 2339 | + | |
2340 | 2340 | | |
2341 | 2341 | | |
| 2342 | + | |
2342 | 2343 | | |
2343 | | - | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
2344 | 2348 | | |
2345 | | - | |
2346 | 2349 | | |
2347 | 2350 | | |
2348 | | - | |
| 2351 | + | |
2349 | 2352 | | |
2350 | 2353 | | |
2351 | 2354 | | |
2352 | 2355 | | |
2353 | 2356 | | |
2354 | 2357 | | |
2355 | | - | |
2356 | | - | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
| 2358 | + | |
| 2359 | + | |
2364 | 2360 | | |
| 2361 | + | |
2365 | 2362 | | |
2366 | 2363 | | |
2367 | 2364 | | |
2368 | | - | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
2369 | 2381 | | |
2370 | 2382 | | |
2371 | 2383 | | |
| |||
0 commit comments