You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2019/12/26 11:59:21 UTC

[httpcomponents-core] branch bug-fixes created (now 5ebb926)

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a change to branch bug-fixes
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git.


      at 5ebb926  Bug-fix: H2 protocol handler to reset all streams unconditionally in case of an unexpected exception and attempt to close the i/o session gracefully if possible

This branch includes the following new commits:

     new 5ebb926  Bug-fix: H2 protocol handler to reset all streams unconditionally in case of an unexpected exception and attempt to close the i/o session gracefully if possible

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[httpcomponents-core] 01/01: Bug-fix: H2 protocol handler to reset all streams unconditionally in case of an unexpected exception and attempt to close the i/o session gracefully if possible

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch bug-fixes
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git

commit 5ebb926a3cdc5d7e986206db07a2224ef67c1f88
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Wed Dec 25 14:26:51 2019 +0100

    Bug-fix: H2 protocol handler to reset all streams unconditionally in case of an unexpected exception and attempt to close the i/o session gracefully if possible
---
 .../hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java       | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
index 9f66bd1..91280c3 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
@@ -678,10 +678,7 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
             for (final Iterator<Map.Entry<Integer, H2Stream>> it = streamMap.entrySet().iterator(); it.hasNext(); ) {
                 final Map.Entry<Integer, H2Stream> entry = it.next();
                 final H2Stream stream = entry.getValue();
-                if (stream.isLocalClosed() && (stream.isRemoteClosed() || stream.isLocalReset())) {
-                    stream.reset(cause);
-                }
-                stream.releaseResources();
+                stream.reset(cause);
             }
             streamMap.clear();
             if (!(cause instanceof ConnectionClosedException)) {
@@ -701,7 +698,7 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
             connState = ConnectionHandshake.SHUTDOWN;
         } catch (final IOException ignore) {
         } finally {
-            ioSession.close(CloseMode.IMMEDIATE);
+            ioSession.close(cause instanceof IOException ? CloseMode.IMMEDIATE : CloseMode.GRACEFUL);
         }
     }