Skip to content

Session.invalidate() leaves in-flight CDP calls pending #154

Description

@green3sf

Description

Session.invalidate() clears this.ws before closing the socket. The close listener then treats that socket as superseded and returns without rejecting entries in pending, so an in-flight CDP call can remain pending forever.

Plugins

None

OpenCode version

main at e634099

Steps to reproduce

  1. Connect a Session to a WebSocket endpoint.
  2. Start a CDP call that does not receive a response.
  3. Call session.invalidate(error).
  4. Observe that the call never settles. It should reject with the invalidation error.

Screenshot and/or share link

No response

Operating System

macOS

Terminal

Codex desktop

Metadata

Metadata

Assignees

No one assigned

    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