Skip to content

fix: remove abort listener after fetch settles#1877

Open
MukundaKatta wants to merge 1 commit into
openai:masterfrom
MukundaKatta:codex/remove-abort-listener-on-fetch-success
Open

fix: remove abort listener after fetch settles#1877
MukundaKatta wants to merge 1 commit into
openai:masterfrom
MukundaKatta:codex/remove-abort-listener-on-fetch-success

Conversation

@MukundaKatta
Copy link
Copy Markdown

Fixes #1811.

Summary

  • remove the forwarded caller abort listener after fetchWithTimeout settles
  • keep the existing internal timeout cleanup behavior
  • add a regression test that verifies the caller signal listener is detached after a successful request

Verification

  • yarn test tests/index.test.ts --runInBand
  • npx -p node@20 -c './node_modules/.bin/prettier --check src/client.ts tests/index.test.ts && ./node_modules/.bin/eslint src/client.ts tests/index.test.ts'
  • npx -p node@20 -c './scripts/build'

Note: full yarn lint proceeds through Prettier, ESLint, and build under Node 20, then local type-checking fails because optional example dependencies are not installed in this checkout: @azure/identity, express, and next.

@MukundaKatta MukundaKatta marked this pull request as ready for review May 15, 2026 02:15
@MukundaKatta MukundaKatta requested a review from a team as a code owner May 15, 2026 02:15
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.

fetchWithTimeout does not remove abort event listener on successful completion, preventing process exit on Deno

1 participant