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

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


The following commit(s) were added to refs/heads/11.0.x by this push:
     new bd08f03061 Review "Guard the time bucket counter maintenance futures 
against a..."
bd08f03061 is described below

commit bd08f03061b73710b93b1ae578778d9e27c7f491
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Oct 23 22:33:54 2026 +0100

    Review "Guard the time bucket counter maintenance futures against a..."
    
    Restore the interrupt flag
---
 java/org/apache/catalina/util/TimeBucketCounterBase.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/util/TimeBucketCounterBase.java 
b/java/org/apache/catalina/util/TimeBucketCounterBase.java
index 85c5d04738..9688da8063 100644
--- a/java/org/apache/catalina/util/TimeBucketCounterBase.java
+++ b/java/org/apache/catalina/util/TimeBucketCounterBase.java
@@ -234,7 +234,11 @@ public abstract class TimeBucketCounterBase {
                         // There was an error executing the scheduled task, 
get it and log it
                         try {
                             maintenanceFuture.get();
-                        } catch (InterruptedException | ExecutionException e) {
+                        } catch (InterruptedException e) {
+                            // Restore the flag for the executor thread
+                            Thread.currentThread().interrupt();
+                            
log.error(sm.getString("timebucket.maintenance.error"), e);
+                        } catch (ExecutionException e) {
                             
log.error(sm.getString("timebucket.maintenance.error"), e);
                         }
                     }


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

Reply via email to