On Thu, 6 Nov 2025 13:15:59 GMT, Volkan Yazici <[email protected]> wrote:

>> test/jdk/java/net/httpclient/websocket/WebSocketTest.java line 172:
>> 
>>> 170:                         .newWebSocketBuilder()
>>> 171:                         .buildAsync(server.getURI(), webSocketListener)
>>> 172:                         .join();
>> 
>> Shouldn't you add a `connectTimeout` to the web socket builder? Otherwise of 
>> course you won't find any :-)
>
> I was naively expecting `WebSocket.Builder` to inherit `connectTimeout` from 
> the parent `HttpClient`, I was indeed mistaken. Corrected it in c3210d88d0c.

Well the connect timeout if set in the client *is* inherited, but it only 
concerns TCP/TLS and stops after the SSL handshake.
The WebSocket connect timeout additionally covers the WebSocket handshake - and 
stops when the 101 response is received.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27469#discussion_r2499601626

Reply via email to