[ https://issues.apache.org/jira/browse/HTTPCLIENT-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCLIENT-1098. ------------------------------------------- Resolution: Fixed Fix Version/s: 4.1.2 Fix committed to SVN trunk and 4.1.x branch. Please re-test your application against the latest SVN snapshot. Oleg > Populating exception message with InetSocketAddress.getHostName() can take a > long time > -------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1098 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1098 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpConn > Affects Versions: 4.1.1 > Reporter: Thomas Boettcher > Labels: ConnectTimeoutException, InetSocketAddress, getHostName > Fix For: 4.1.2 > > Attachments: exception_message.txt > > > In the PlainSocketFactory class, when a SocketTimeoutException occurs a call > is made to InetSocketAddress.getHostName() when generating the exception > message. Unfortunately, this call can take a long time. In my case, the > address I am specifying is an IP address, which InetSocketAddress attempts to > perform a reverse-lookup on to determine the hostname; however, since the > address does not have a hostname assigned to it, the operation takes a long > time to return. > I'm attaching a patch for trunk with my proposed fix. Viewing the source > history, it looks like the code used to have the behavior I'm proposing, but > it was changed in revision 1070943. Based on the source commits and linked > issues, I cannot determine a specific reason for the change. If there is a > reason the code needs to be the way it is, then I apologize for inconvenience > I have caused. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org