Commit f539edb
committed
ICE client: fix retrigger
Sometimes the RFC algorithm wants you to immediately 'retrigger' a
candidate check. The previous code was deleting the previous request
and creating a new one. But this means that any reply that comes in
cannot get matched up, because the new request will get a new
transaction ID. In general, I think any time we cancel a request and
throw it away, it is probably a mistake, because the reply that comes
back contains useful information, and if we throw away the request, we
won't be able to match it up by transaction ID and remember what we were
doing, so we lose that information.
This can be catastrophic. The Mac CI was failing because of a timing
issue where each side would 'retrigger' its request just before the
reply to the previous request arrived. All of the responses were
getting dropped because they could not be matched up by transaction ID.
The new code just resets the retransmission timer, causing us to send it
immediately and also resets the exponential backoff schedule.
Also, simplify some logic and tweak formatting.1 parent 85be74f commit f539edb
2 files changed
Lines changed: 53 additions & 25 deletions
File tree
- src/steamnetworkingsockets/clientlib
Lines changed: 48 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
898 | 904 | | |
899 | 905 | | |
900 | 906 | | |
| |||
1627 | 1633 | | |
1628 | 1634 | | |
1629 | 1635 | | |
1630 | | - | |
1631 | | - | |
1632 | | - | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
1633 | 1640 | | |
1634 | 1641 | | |
1635 | | - | |
1636 | | - | |
1637 | | - | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
1638 | 1655 | | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | 1656 | | |
1643 | 1657 | | |
1644 | 1658 | | |
1645 | 1659 | | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
1649 | 1664 | | |
1650 | 1665 | | |
1651 | 1666 | | |
1652 | 1667 | | |
1653 | | - | |
| 1668 | + | |
1654 | 1669 | | |
1655 | 1670 | | |
1656 | | - | |
1657 | | - | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
1658 | 1675 | | |
1659 | | - | |
1660 | | - | |
1661 | | - | |
1662 | | - | |
1663 | | - | |
1664 | | - | |
1665 | | - | |
1666 | | - | |
| 1676 | + | |
1667 | 1677 | | |
1668 | 1678 | | |
1669 | 1679 | | |
1670 | 1680 | | |
1671 | | - | |
1672 | 1681 | | |
1673 | | - | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
1674 | 1697 | | |
1675 | 1698 | | |
1676 | 1699 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| |||
0 commit comments