Skip to content

bug(rpc): pending RPC calls hang forever when target Worker disconnects #34981

Closed as not planned

Description

@HEETMEHTA18

Bug

When a Worker crashes or emits "error" or "messageerror", all pending Rpc.call() promises never settle. The pending Map leaks the resolve callbacks.

Steps to reproduce

  1. Create a Worker and call Rpc.client(worker)
  2. Make an RPC call via client.call("method", {})
  3. Kill/terminate the Worker before it responds
  4. The returned Promise hangs indefinitely

Expected

The Promise should reject with an error indicating the target disconnected.

Actual

The Promise never settles. Memory leak in pending Map.

Environment

All versions using @/util/rpc from packages/opencode/src/util/rpc.ts

Activity

  1. github-actions commented on Sep 1, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions