Repository navigation
Bun.serve direct streams: flush on controller.close(), end the response once, call cancel() only on a client abort #41894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
97aa4dc
Bun.serve direct streams: flush on controller.close(), end the respon…
Jarred-Sumner 8a47ae5
Sink controllers call their close/ready handler directly; an async di…
Jarred-Sumner a93c239
One-line comment on directStreamOnClose
robobun fc40ef8
Native stream sources notify their C++ adapter on close directly; dro…
Jarred-Sumner fc8979b
FileSink::close_with_error: hold a ref across end_from_stream
robobun 458d4a6
Direct streams: pull() runs once for readers too; close(error) fails …
Jarred-Sumner 7cd62d8
close(error) rejects the sink owner's promise; server contract cells …
Jarred-Sumner 4dee616
close(error) framing test: the response is aborted, not terminated
Jarred-Sumner b4227a5
[autofix.ci] apply automated fixes
autofix-ci[bot] 7567030
Direct stream edge-case tests: matrix shapes, pipes, generators, node…
Jarred-Sumner 093df49
A pull() that rejects after the sink already detached has nothing to …
Jarred-Sumner 985a3a8
abort-while-parked test: keep writing until backpressure so the abort…
Jarred-Sumner ed20a6a
Quiet the expected body-error logs in the serve contract and edge-cas…
Jarred-Sumner ffe8284
Bun.serve: a body that fails after the status line is committed goes …
Jarred-Sumner 0d4dbcf
Direct stream controller: write()/flush() after close or peer disconn…
Jarred-Sumner 2190402
[autofix.ci] apply automated fixes
autofix-ci[bot] 30c33a8
test: read the Bun.write output before the temp dir is disposed; allo…
robobun 6dc9020
Update two serve tests to the write()-after-close → 0 contract
Jarred-Sumner 42772f3
CI follow-ups: Bake SSR closes its direct stream with the error; HTTP…
Jarred-Sumner 89c3c18
serve-stream-body-error: error()'s own body failing after commit is p…
Jarred-Sumner 4540402
[autofix.ci] apply automated fixes
autofix-ci[bot] 35b93cf
serve.test: a body that throws in pull() now reaches error() (whose R…
Jarred-Sumner f4f932d
[autofix.ci] apply automated fixes
autofix-ci[bot] 71df837
Review follow-ups: end(value) stays a clean close on the reader and o…
Jarred-Sumner bd51ca9
serve: keep error() bypassed for a body that fails after the status l…
Jarred-Sumner 819d83f
Direct-stream controller: write()/flush() return 0 only when the dest…
Jarred-Sumner 1b48359
Direct streams: a reader keeps calling pull() on demand; only whole-b…
Jarred-Sumner 11fe484
Review follow-ups: a sync pull() that calls close(error) rejects the …
Jarred-Sumner 0839195
[autofix.ci] apply automated fixes
autofix-ci[bot] c671562
FileSink::pipe_stream: release the stream Strong when the pump fails …
Jarred-Sumner c70a379
HTTPServerWritable::fail() drops the buffered tail instead of parking…
Jarred-Sumner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.