Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 72DBE200C6F for ; Tue, 9 May 2017 21:57:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 71877160BD9; Tue, 9 May 2017 19:57:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9C808160BC3 for ; Tue, 9 May 2017 21:57:54 +0200 (CEST) Received: (qmail 64986 invoked by uid 500); 9 May 2017 19:57:53 -0000 Mailing-List: contact commits-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 commits@hc.apache.org Received: (qmail 64697 invoked by uid 99); 9 May 2017 19:57:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 May 2017 19:57:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 30210E0FE7; Tue, 9 May 2017 19:57:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: olegk@apache.org To: commits@hc.apache.org Date: Tue, 09 May 2017 19:57:55 -0000 Message-Id: <54227fdd13ef425c804cc416e59bfb9b@git.apache.org> In-Reply-To: <8a8108f3a94142b0bb4fe4d7e8be443e@git.apache.org> References: <8a8108f3a94142b0bb4fe4d7e8be443e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/50] [abbrv] httpcomponents-core git commit: Corrected termination of pending commands by HTTP/1.1 stream duplexer archived-at: Tue, 09 May 2017 19:57:55 -0000 Corrected termination of pending commands by HTTP/1.1 stream duplexer git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk@1791943 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/9ae9ade8 Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/9ae9ade8 Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/9ae9ade8 Branch: refs/heads/trunk Commit: 9ae9ade8931014e10f3cdb8677507f3d274c357e Parents: 572bbd3 Author: Oleg Kalnichevski Authored: Wed Apr 19 16:39:53 2017 +0000 Committer: Oleg Kalnichevski Committed: Wed Apr 19 16:39:53 2017 +0000 ---------------------------------------------------------------------- .../nio/AbstractHttp2StreamMultiplexer.java | 1 + .../impl/nio/AbstractHttp1StreamDuplexer.java | 30 +++++++++++++------- 2 files changed, 21 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9ae9ade8/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java ---------------------------------------------------------------------- diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java index 7a53353..61c7fb9 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java @@ -647,6 +647,7 @@ abstract class AbstractHttp2StreamMultiplexer implements HttpConnection { final ExecutionCommand executionCommand = (ExecutionCommand) command; final AsyncClientExchangeHandler exchangeHandler = executionCommand.getExchangeHandler(); exchangeHandler.failed(cause); + exchangeHandler.releaseResources(); } else { command.cancel(); } http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9ae9ade8/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java ---------------------------------------------------------------------- diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java index 176350c..bbda5c8 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java @@ -57,6 +57,7 @@ import org.apache.hc.core5.http.impl.BasicHttpConnectionMetrics; import org.apache.hc.core5.http.impl.BasicHttpTransportMetrics; import org.apache.hc.core5.http.impl.CharCodingSupport; import org.apache.hc.core5.http.impl.ConnectionListener; +import org.apache.hc.core5.http.nio.AsyncClientExchangeHandler; import org.apache.hc.core5.http.nio.CapacityChannel; import org.apache.hc.core5.http.nio.ContentDecoder; import org.apache.hc.core5.http.nio.ContentEncoder; @@ -366,14 +367,13 @@ abstract class AbstractHttp1StreamDuplexer= 0) { ioSession.close(); - cancelPendingCommands(); releaseResources(); } } public final void onTimeout() throws IOException, HttpException { if (!handleTimeout()) { - shutdownSession(new SocketTimeoutException()); + onException(new SocketTimeoutException()); } } @@ -383,6 +383,20 @@ abstract class AbstractHttp1StreamDuplexer