This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new af86296801 Fix possible path for UpgradeInfo not to be unregistered
af86296801 is described below
commit af86296801af96091e2d55e93811cac601f3ab72
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 c1c82f8e0d..87b8193d76 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -1435,6 +1435,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 64c500b75b..f4e13d4bbc 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -596,6 +596,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]