Skip to content

[Bug] Make WebSocket teardown safe during connection setup #107

Description

@GregHolmes

Follow-up from #104. The generated Listen v1/v2, Speak v1/v2, and Agent v1 WebSocket clients do not have an atomic connection lifecycle: disconnect() can race listener publication and onOpen, leaving a late socket or unresolved connection future.

Scope:

  • Define whether disconnect() is terminal or supports reuse.
  • Make listener publication, in-flight connection cancellation, onOpen, and retry scheduling safe under that contract.
  • Add deterministic race tests for teardown before listener publication, between socket creation and publication, and between onOpen and client-future completion.
  • Update all streaming quickstarts only once the generated-client lifecycle is safe.

This is intentionally separate from the SDK-client OkHttp ownership fix in #104.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions