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 2690c2838d Don't attempt to release Semaphore that was not acquired.
2690c2838d is described below

commit 2690c2838d70698092b3ece5dfcdeddc1000a472
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jun 3 14:59:02 2026 +0100

    Don't attempt to release Semaphore that was not acquired.
---
 java/org/apache/catalina/valves/PersistentValve.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index de44fbaacd..0e171a13bb 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -156,6 +156,7 @@ public class PersistentValve extends ValveBase {
                     }
                 } else {
                     if (!semaphore.tryAcquire()) {
+                        mustReleaseSemaphore = false;
                         onSemaphoreNotAcquired(request, response);
                         if (containerLog.isDebugEnabled()) {
                             containerLog.debug(


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

Reply via email to