On Thu, 5 Feb 2026 14:15:37 GMT, Daniel Fuchs <[email protected]> wrote:

>>> OK - this is because the OS specific timeout kicks in. So you might get a 
>>> `ConnectException` if the timeout you provide to connect() exceeds the 
>>> OS/platform specific timeout. Otherwise you get the 
>>> `SocketTimeoutException`.
>> 
>> Could you explain this a little bit more, please? Because, in the Windows 
>> host JTreg log I privately shared with you, there is the `elapsed time 
>> (seconds): 0.903` line. That is, `connect(..., 5000)` threw 
>> `ConnectionException` in less than 1s, which is less than both the timeout I 
>> provide (i.e., 5s) and the OS defaults to. Am I missing something?
>
> I was speaking about unix platforms behaviour here. The test excludes windows 
> platforms.

On windows I see you do not get a timeout, but a "connection refused". Also in 
the log you shared you seem to be using `new Socket(host,port)` so the timeout 
is the default platform timeout - for which you always get the  
`ConnectException`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29431#discussion_r2769435886

Reply via email to