This is an automated email from the ASF dual-hosted git repository.
jfclere pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 38d9cc941d Don't wait is a war is not more existing.
38d9cc941d is described below
commit 38d9cc941d890c3cf42bbf642384e7118db6596f
Author: Jean-Frederic Clere <[email protected]>
AuthorDate: Mon Nov 20 15:58:51 2023 +0100
Don't wait is a war is not more existing.
---
java/org/apache/catalina/startup/HostConfig.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/java/org/apache/catalina/startup/HostConfig.java
b/java/org/apache/catalina/startup/HostConfig.java
index 52e75eeed6..1bdb18f5b5 100644
--- a/java/org/apache/catalina/startup/HostConfig.java
+++ b/java/org/apache/catalina/startup/HostConfig.java
@@ -1385,10 +1385,13 @@ public class HostConfig implements LifecycleListener {
} else {
// There is a chance the the resource was only missing
// temporarily eg renamed during a text editor save
- try {
- Thread.sleep(500);
- } catch (InterruptedException e1) {
- // Ignore
+ if (resource.exists() ||
+
!resource.getName().toLowerCase(Locale.ENGLISH).endsWith(".war")) {
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e1) {
+ // Ignore
+ }
}
// Recheck the resource to see if it was really deleted
if (resource.exists()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]