Skip to content

Fix leaked socket after HTTP download timeout - #1292

Open
dajudge wants to merge 1 commit into
actions:mainfrom
dajudge:fix/download-timeout-socket-leak
Open

dajudge wants to merge 1 commit into
actions:mainfrom
dajudge:fix/download-timeout-socket-leak

Conversation

@dajudge

@dajudge dajudge commented Oct 20, 2026

Copy link
Copy Markdown

Description

Fix a socket leak in @actions/http-client timeout handling.

The existing timeout callback calls socket.end(), which can leave a half-open client socket alive when the remote peer keeps its side of the connection open. That keeps the Node.js event loop active after the action’s work has completed.

This change patches the dependency during build and test setup to destroy the timed-out request with the timeout error instead. The patch is idempotent and fails fast if the expected upstream dependency implementation changes.

The compiled dist/ bundles have been regenerated.

This patch was developed with assistance from GPT-5.6-Sol.

Related issue

N/A

Check list

  • Ran npm run check locally (format, lint, build, test) and all checks pass.
  • Documentation changes are not required.
  • Added a regression test using a half-open TCP server to verify no client socket remains active after timeout.

@dajudge
dajudge requested a review from a team as a code owner October 20, 2026 07:09

This branch has not been deployed

No deployments
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