Skip to content

Conversation

@Sai4Nandhan
Copy link

This relates to...

N/A

Rationale

Delayed mock responses created using MockAgent continued executing even after a request was aborted via AbortSignal, which does not match real undici request cancellation behavior.

Changes

Added AbortSignal handling to the delayed mock dispatch logic to ensure scheduled responses are cancelled when a request is aborted.

Features

N/A

Bug Fixes

  • Fixed delayed MockAgent responses executing after AbortSignal cancellation by clearing scheduled timers on abort.

Breaking Changes and Deprecations

N/A

Status

  • I have read and agreed to the [Developer's Certificate of Origin][cert]
  • Tested
  • Benchmarked
  • Documented
  • Review ready
  • In review
  • Merge ready

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Thanks for opening a PR! Can you please add a unit test?

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.

2 participants