fix: abort composed signals immediately by lin-hongkuan · Pull Request #11035 · axios/axios · GitHub
Skip to content

fix: abort composed signals immediately#11035

Open
lin-hongkuan wants to merge 1 commit into
axios:v1.xfrom
lin-hongkuan:codex/compose-signals-preaborted
Open

fix: abort composed signals immediately#11035
lin-hongkuan wants to merge 1 commit into
axios:v1.xfrom
lin-hongkuan:codex/compose-signals-preaborted

Conversation

@lin-hongkuan

@lin-hongkuan lin-hongkuan commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Propagates already-aborted input signals immediately when composing AbortSignals.

Linked issue

N/A

Changes

  • Detect already-aborted signals before registering abort listeners.
  • Reuse the existing abort path so cancellation cleanup and reason handling stay consistent.
  • Add a regression test for composing a pre-aborted signal.

Validation

  • npm run test:vitest:unit -- tests/unit/composeSignals.test.js tests/unit/helpers/composeSignals.test.js
  • npm run lint -- lib/helpers/composeSignals.js
  • git diff --check

Checklist

  • Tests added or updated (or N/A with reason)
  • Docs/types updated if public API changed (index.d.ts and index.d.cts)
  • No breaking changes (or called out explicitly above)

🏄

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant