You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cancelling WebSocket connect leaves the HTTP upgrade socket open #4433
Both JdkWebSocketTransport.connect and OkHttpWebSocketTransport.connect create a Mono without cancellation cleanup. Disposing the subscription while the HTTP upgrade is stalled leaves the socket open until a timeout or a later server response, even though the caller no longer needs the connection.
Evidence
On main@5a315a9af, real loopback servers accept the upgrade request and intentionally withhold the handshake response. After disposing the connection subscription, both JDK and OkHttp connections remain open until the server's five-second read deadline. Additional JDK future regressions show pending handshake futures are not cancelled and an uncancellable future's late socket is not aborted. The successful connection ownership control passes.
Proposed scope
Register cleanup on subscription cancellation, cancel the JDK handshake future/OkHttp WebSocket, and abort an undelivered JDK socket returned after cancellation. Preserve delivered-connection ownership, error mapping, proxy configuration and message processing. Tests use local sockets/mocked futures, with no live model provider or credentials.
Activity