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 EC61F17C68 for ; Sat, 22 Nov 2014 00:40:38 +0000 (UTC) Received: (qmail 89679 invoked by uid 500); 22 Nov 2014 00:40:33 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 89635 invoked by uid 500); 22 Nov 2014 00:40:33 -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 89623 invoked by uid 99); 22 Nov 2014 00:40:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Nov 2014 00:40:33 +0000 Date: Sat, 22 Nov 2014 00:40:33 +0000 (UTC) From: "Bo Xing (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HTTPCORE-391) SocketTimeoutExceptions thrown in case of connection timeouts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCORE-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bo Xing updated HTTPCORE-391: ----------------------------- Component/s: (was: HttpCore NIO) > SocketTimeoutExceptions thrown in case of connection timeouts > ------------------------------------------------------------- > > Key: HTTPCORE-391 > URL: https://issues.apache.org/jira/browse/HTTPCORE-391 > Project: HttpComponents HttpCore > Issue Type: Improvement > Affects Versions: 4.3.2 > Reporter: Bo Xing > Fix For: 4.3.3, 4.4-beta1 > > > When a connection timeout happens, a SocketTimeoutException is thrown with no context at all. As a result, applications are unable to differentiate between connection timeouts and actual socket timeouts. Is there a reason why it is not a ConnectionTimeoutException that is thrown here? I understand that ConnectionTimeoutException is part of the sync client library. But can we create a similar one in the async client library, and let the RouteSpecificPool class throw it? > Please advise. Thanks! > The stack trace is as follows. > java.net.SocketTimeoutException > at org.apache.http.nio.pool.RouteSpecificPool.timeout(RouteSpecificPool.java:170) > at org.apache.http.nio.pool.AbstractNIOConnPool.requestTimeout(AbstractNIOConnPool.java:546) > at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.timeout(AbstractNIOConnPool.java:779) > at org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(SessionRequestImpl.java:177) > at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:212) > at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:157) > at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) > at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:189) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.doExecute(CloseableHttpAsyncClientBase.java:67) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.access$000(CloseableHttpAsyncClientBase.java:38) > at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:57) > at java.lang.Thread.run(Thread.java:724) -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org