Repository navigation
fix(locallibrary): stop sending a cancelled net/fetch or upload body at the next chunk - #344
Merged
Merged
Conversation
…at the next chunk
botandbang
enabled auto-merge
October 30, 2026 23:00
bnb
approved these changes
Oct 30, 2026
Rust coverageFrom run 627. Both are held to the thresholds in .cargo/config.toml.
|
This was referenced Oct 31, 2026
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.
a_recording_stops_being_sent_once_publishing_is_cancelled(added in #317) fails most runs on macOS on main since #328 landed: 8 of 10 on 41abcae here, with all 32 MiB of the recording sent after the cancel. #328 moved cancelling a plugin'snet/fetchand a set upload intoRequests::run, which checks the token every 50 ms, and dropped the check the body made on every read. The host gets the plugin's$/cancelbefore publishing returns, then kept reading the file and sending it until the next check, which over loopback can be all of it.Changed:
net::streamedtakes the cancel token and fails the body at the next 64 KiB chunk once it's set.Requests::rungivesNonewhen the token is set by the time the request finishes, so that failure reports ascancelled.Body::send(a plugin'snet/fetch, file bodies and multipart parts) and the recording upload insets publish --uploadpass their tokens tostreamed.apps/locallibrary/changes/upload-cancel-fix.md.Nothing removed, and the test is unchanged. With the fix it passed 30 of 30 runs, and with the fix's two checks disabled it failed 8 of 10. The cancel, net, destinations, peer and upload tests in locallibrary and loclib-plugin pass (100 of 100), as do clippy and fmt.