Skip to content

fix: reject IPC subscriptions on socket errors - #5575

Closed
yinbowen-dc wants to merge 1 commit into
wevm:mainfrom
yinbowen-dc:codex/fix-5568-ipc-subscribe-errors
Closed

yinbowen-dc wants to merge 1 commit into
wevm:mainfrom
yinbowen-dc:codex/fix-5568-ipc-subscribe-errors

Conversation

@yinbowen-dc

Copy link
Copy Markdown
Contributor

Fixes #5568.

Forward socket errors to both the pending IPC subscribe promise and the subscription error callback, matching the existing WebSocket behavior. A peer closing before its subscription acknowledgement now rejects the call instead of leaving it pending.

Validation: a real IPC peer closes after receiving eth_subscribe. The test remains pending on main; the patch produces SocketClosedError, passes that error to onError and leaves no pending requests. All 8 related tests pass, and Biome passes. Includes a patch changeset. Full project types currently require generated test-contract artifacts.

AI assistance: prepared and tested with Codex at the account owner's request.

@vercel

vercel Bot commented Nov 18, 2026

Copy link
Copy Markdown

@yinbowen-dc is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2bdbf12

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

jxom commented Nov 18, 2026

Copy link
Copy Markdown
Member

Thanks @yinbowen-dc! Your fix is correct. We've carried it forward with your commit in #5582, which moves the test into ipc.test.ts, adds coverage for established subscriptions, and updates the changeset. Closing in favor of that PR.

@jxom jxom closed this Nov 18, 2026
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.

ipc transport: subscribe() never settles when the socket closes before the reply

2 participants