When establishing connections to remote hosts, the existing implementation was not sufficient for managing connection timeouts. The existing implementation relies on Thread.join(timeout) to interrupt the thread that creates the Socket object, however, since it's down in the depths of the native OS, the interrupt isn't handled properly. Attached is a patch for Util.java that adds a few lines to create a socket with a timeout. Tested on RHEL 5.3 w/JDK 1.6.0_10.
Log in to post a comment.