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 aca1f0ee30 Review "Guard the time bucket counter maintenance futures
against a..."
aca1f0ee30 is described below
commit aca1f0ee30f78ab94fbe38f8681b04b685b4af9b
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]