fix(scan): honour the caller context when downloading the ports list - #324
Merged
Conversation
the common-scope ports fetch built its request with context.TODO(), so a cancelled run or -max-time deadline could not abort a hung list download even though the dialer already used the passed context.
pr summary2 files changed (+63 -1)
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
=======================================
Coverage ? 54.90%
=======================================
Files ? 81
Lines ? 6874
Branches ? 0
=======================================
Hits ? 3774
Misses ? 2828
Partials ? 272 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vmfunc
approved these changes
Jul 22, 2026
vmfunc
left a comment
Owner
There was a problem hiding this comment.
ports.go:50 was the only spot still on context.TODO() while the dialer already threaded ctx, so the list download couldn't be aborted mid-flight. right fix. and the test cancelling before the call so only ctx-awareness can unblock it is exactly the thing that proves it. in.
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.
the common-scope ports fetch built its request with context.TODO(),
so a cancelled run or -max-time deadline could not abort a hung list
download even though the dialer already used the passed context.