On 04/09/2019 18:52, Pavel Rappo wrote:
You are right, it definitely is a blocking operation. I missed it. I was 
focused on

     712         sock.setSoTimeout(timeoutLeft);

So I'd suggest we use explicit connect with timeout

     java.net.Socket#connect(java.net.SocketAddress, int)

Are you okay with that?

Decomposing timeouts is hard to get right. In this case I think you want to specify the initial timeout to connect, then set timeoutLeft to be the remaining (will be less than "timeout").

-Alan

Reply via email to