Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A33E848D9 for ; Mon, 6 Jun 2011 16:54:24 +0000 (UTC) Received: (qmail 86291 invoked by uid 500); 6 Jun 2011 16:54:24 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 86254 invoked by uid 500); 6 Jun 2011 16:54:24 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 86246 invoked by uid 99); 6 Jun 2011 16:54:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 16:54:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 16:54:23 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 29B44103EFB for ; Mon, 6 Jun 2011 16:54:03 +0000 (UTC) Date: Mon, 6 Jun 2011 16:54:03 +0000 (UTC) From: "Thomas Boettcher (JIRA)" To: dev@hc.apache.org Message-ID: <543810983.966.1307379243167.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (HTTPCLIENT-1098) Populating exception message with InetSocketAddress.getHostName() can take a long time MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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 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-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org