Commit 3a9288b
committed
MSRP: improve port state access safety in talker propagation
The talker propagation logic in _onRegisterStreamIndication read port state
once at the beginning of the apply loop and then used that snapshot across
multiple await suspension points where concurrent operations could modify the
underlying state. This was particularly problematic for _canBridgeTalker, which
makes admission control decisions based on bandwidth calculations. This change
addresses the race condition by reading port state twice: once for the initial
pruning check (where a snapshot is acceptable) and again immediately before
_canBridgeTalker (to ensure bandwidth calculations use current state), reducing
the window for stale data to cause incorrect admission control decisions.1 parent d6d8e2d commit 3a9288b
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
902 | | - | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
903 | 905 | | |
904 | 906 | | |
905 | 907 | | |
906 | | - | |
| 908 | + | |
907 | 909 | | |
908 | 910 | | |
909 | 911 | | |
| |||
946 | 948 | | |
947 | 949 | | |
948 | 950 | | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
949 | 956 | | |
950 | 957 | | |
951 | | - | |
| 958 | + | |
952 | 959 | | |
953 | 960 | | |
954 | 961 | | |
| |||
0 commit comments