sun.rmi.transport.tcp.TCPChannel.createConnection line 227 can hang indefinitely.
The initialization of the socket timeout should occur before the first flush.
This method flushes the DataOutputStream without the socket
timeout settings when choosing the stream protocol [1]. If the connection is lost
or the destination server does not return a response during the flush,
this method waits forever because the timeout settings is set the
default value of SO_TIMEOUT, i.e., infinite.
The initialization of the socket timeout should occur before the first flush.
This method flushes the DataOutputStream without the socket
timeout settings when choosing the stream protocol [1]. If the connection is lost
or the destination server does not return a response during the flush,
this method waits forever because the timeout settings is set the
default value of SO_TIMEOUT, i.e., infinite.