Skip to content

Reject the pending async IPC promise when receiving throws - #136

Open
RichardHoekstra wants to merge 1 commit into
WebHare:mainfrom
RichardHoekstra:github/fix/ipc-async-receive-errors
Open

RichardHoekstra wants to merge 1 commit into
WebHare:mainfrom
RichardHoekstra:github/fix/ipc-async-receive-errors

Conversation

@RichardHoekstra

Copy link
Copy Markdown
Contributor

Problem

With autothrow enabled, ReceiveMessage() can throw out of MessageWaiter.HandleCallback() instead of rejecting the promise that owns the async read.

Change

Catch the receive exception, clear the async waiter registration and reject its deferred promise. Return completion so the callback helper releases the registration normally.

Validation

  • system.nodejs.test_async_ipc: fails before, passes after. Covers both async request/receive APIs, an unrelated promise and a subsequent successful request.
  • Existing IPC, promise and CodeContext tests pass.

No protocol or public API change. Validated on the official 6.2 image for GitHub main a91a7a28, with the candidate sources installed. Full upstream CI has not been run.

@RichardHoekstra
RichardHoekstra requested a review from a team October 27, 2026 15:41

This branch was successfully deployed

1 active deployment
external-ci — c1f7e397 Deployed Oct 27, 2026 by RichardHoekstra via setup #199
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