mirror of
https://github.com/livekit/livekit.git
synced 2026-11-12 20:49:07 +00:00
* rtc: don't let the forwarded RPC timeout underflow PerformRpc forwarded "responseTimeout - p.lastRTT" to the callee, both unsigned. A caller timeout below the callee's round trip, such as 100 ms against 150 ms, wrapped around to about 4.29 billion ms, so the callee was told it had roughly 49 days to respond while the server's own timer still used the real value. lastRTT was also read without p.lock, which UpdateMediaRTT holds when it writes it. Read lastRTT under the lock and keep the caller's timeout when the round trip is not below it. Fixes #5151 * rtc: compute the forwarded RPC timeout inline in PerformRpc Drop the rpcRequestTimeoutMs helper and test the forwarded ResponseTimeoutMs through PerformRpc instead.