Wrap websocket flush in timeout#2908
Merged
Merged
Conversation
a64311f to
8156c8c
Compare
8156c8c to
8b78173
Compare
cloutiertyler
approved these changes
Jun 30, 2025
Contributor
|
New changes also look good to me, since they're mostly mechanical in nature. Would be great to test, but I think it falls under mechanical enough. |
joshua-spacetime
added a commit
that referenced
this pull request
Jul 1, 2025
joshua-spacetime
added a commit
that referenced
this pull request
Jul 1, 2025
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.
Description of Changes
This patch:
The main change here is 3. Because if the flush stalls for any reason, before this patch, we could wait indefinitely without polling the other futures in the
select!arms such as the liveness tick and the websocket receiver.The flush could stall if the receiver stops ack'ing packets or if the tcp send buffer is full.
API and ABI breaking changes
None
Expected complexity level and risk
The change itself is not complicated, but the
select!loop is. I'm fairly certain though that this change won't have any unintended consequences. It certainly doesn't poll fewer futures - it polls more.Testing
Ran a large scale performance test and observed these websocket actors being dropped and cleaned up on disconnects (initiated from both server and client)