JDK-6457066 : SocketTimeoutException : Timing out early
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 5.0u7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_1
  • CPU: sparc
  • Submitted: 2006-08-04
  • Updated: 2011-05-19
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7
5.0u11Fixed 6u2Fixed 7 b03Fixed
Description
Hits java.net.SocketTimeoutExceptions upon trying to make a connection.
Timeout of 5000 ms is set, but the connection attempt fails in much less time than this. 

This happens on a socket taking a long time to connect and the thread getting interrupted. 
This behavior is seen in production, where the socket was
timing out much earlier than expected.

Comments
EVALUATION Update native code to work out the time spent in the "retry connect" loop correctly.
23-08-2006

EVALUATION This problem is unlikely to occur that often in the field but is indeed an issue. The suggested fix in the comments section seems reasonable.
04-08-2006