You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/06/25 09:43:11 UTC

[tomcat] branch master updated: Make sure recycle() is called once the Stream is closed

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

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 785cc6e  Make sure recycle() is called once the Stream is closed
785cc6e is described below

commit 785cc6e61111094684d21ffd14d3594d19b2e93d
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jun 25 10:42:37 2020 +0100

    Make sure recycle() is called once the Stream is closed
---
 java/org/apache/coyote/http2/StreamProcessor.java | 4 ++++
 webapps/docs/changelog.xml                        | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/java/org/apache/coyote/http2/StreamProcessor.java b/java/org/apache/coyote/http2/StreamProcessor.java
index e03f307..80c22ec 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -100,7 +100,11 @@ class StreamProcessor extends AbstractProcessor {
                     ConnectionException ce = new ConnectionException(msg, Http2Error.INTERNAL_ERROR);
                     ce.initCause(e);
                     stream.close(ce);
+                    state = SocketState.CLOSED;
                 } finally {
+                    if (state == SocketState.CLOSED) {
+                        recycle();
+                    }
                     ContainerThreadMarker.clear();
                 }
             }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 39b8245..5fee419 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -103,6 +103,10 @@
         white space around cookie attrubute names and values when using the RFC
         6265 cookie processor. (markt)
       </fix>
+      <fix>
+        Once an HTTP/2 stream has been closed, ensure that the code that cleans
+        up references that are no longer required is called. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org