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

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


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 7192d0ecac Fix possible path for UpgradeInfo not to be unregistered
7192d0ecac is described below

commit 7192d0ecac146e077b09b9d75b98084cfebfffcb
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Nov 9 14:26:52 2026 +0000

    Fix possible path for UpgradeInfo not to be unregistered
    
    Fixes an intermittently failing test
---
 java/org/apache/coyote/AbstractProtocol.java | 7 +++++++
 webapps/docs/changelog.xml                   | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/java/org/apache/coyote/AbstractProtocol.java 
b/java/org/apache/coyote/AbstractProtocol.java
index eea4a724d4..e70af20813 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -1472,6 +1472,13 @@ public abstract class AbstractProtocol<S> implements 
ProtocolHandler, MBeanRegis
 
                 if (processor != null) {
                     wrapper.setCurrentProcessor(processor);
+                    if (wrapper.isClosed()) {
+                        /*
+                         * The socket was closed while this thread owned the 
processor so the close could not release
+                         * it.
+                         */
+                        release(wrapper);
+                    }
                 }
                 return state;
             } catch (SocketException e) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 75ed3bdc90..8d5595c108 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -585,6 +585,10 @@
         connection to be closed as soon as the server started waiting for the
         client. (markt)
       </fix>
+      <fix>
+        Fix unregistering of UpgradeInfo when a connection is closed. Patch
+        suggested by abernal. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to