Repository navigation
Start the signaling send timeout at the first write attempt - #45
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes "The GeForce NOW rig could not be reached" on networks where gathering ICE candidates is slow.
Cause. The diagnostic build from #44 logged
SIGNAL disconnected reason=Send timeout2 ms after the SDP answer was queued. Each outgoing WebSocket frame got a 1 s deadline when it was queued. Creating the answer gathers STUN candidates synchronously on the signaling thread, and on this user's network that took 1.8–3.4 s (on a nearby network it takes about 0.2 s). A frame queued before that pause was already older than 1 s at the next drain, so the client closed its own signaling socket before the answer went out. The server then never received the answer, never trickled its media candidate, and all ICE pairs failed.Fix.
WriteQueuenow starts a frame's deadline the first time it tries to write that frame. Time spent waiting in the queue while the thread is busy no longer counts. A socket that keeps refusing data still times out after 1 s from the first attempt.enqueueno longer takes a timestamp.Tests. The queue test now checks two cases. Frames that wait 3 s in the queue and then each write within their own window complete. A frame whose writes keep returning
Againfor 1 s after the first attempt still times out. The two old assertions that expected a frame never written to time out were testing the bug itself, so this change replaces them. The 95 streaming checks pass, both normally and under ASan/UBSan, and the Switch NRO builds.