Repository navigation
net: accept_one, so an open stream cannot hold up /v1/status - #8
Merged
Merged
Conversation
…status serve_one answered and streamed on one thread, so a viewer with the page open held up every other request: /v1/status timed out until the tab closed, and the backlog reset the page. accept_one answers everything but an admitted /stream and returns that as a StreamConn to run on any thread; serve_one is accept_one with the stream run in place. A test holds a live stream and gets the status and the page's 403 at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
MjpegHttpServer::serve_oneanswered and streamed on one thread, so while a viewer had the page open, every other request waited. A hub's/v1/statuspoll timed out until the tab closed (found on a XIAO: 0 bytes for 15 s, three times, then 200 in 0.13 s once the tab closed), and the listen backlog reset/.accept_one(&mut stats) -> Accepted: answers everything except an admitted/stream(status, page, refusals), and returns that stream asAccepted::Stream(StreamConn).StreamConn::run(source, scratch, stats): plays it on whatever thread the caller chooses.serve_oneisaccept_onewith the stream run in place, so its behaviour is unchanged for existing callers.Test:
the_status_answers_while_a_stream_is_openholds a live stream and gets/v1/status(200) and the page refusal (403) back within 2 s.🤖 Generated with Claude Code