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.
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 andonOpen, leaving a late socket or unresolved connection future.Scope:
disconnect()is terminal or supports reuse.onOpen, and retry scheduling safe under that contract.onOpenand client-future completion.This is intentionally separate from the SDK-client OkHttp ownership fix in #104.