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

markt-asf 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 af0ce3a9dc Fix potential concurrency issue
af0ce3a9dc is described below

commit af0ce3a9dc820f006cb62722f0e6f5023a50a721
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jun 24 18:35:49 2026 +0100

    Fix potential concurrency issue
---
 java/org/apache/catalina/ha/deploy/FileMessageFactory.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java 
b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
index 4c49bfac29..68e9596e6f 100644
--- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
+++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
@@ -207,7 +207,7 @@ public class FileMessageFactory {
      *
      * @return returns true if the file is complete and outputstream is 
closed, false otherwise.
      */
-    public boolean writeMessage(FileMessage msg) throws 
IllegalArgumentException, IOException {
+    public synchronized boolean writeMessage(FileMessage msg) throws 
IllegalArgumentException, IOException {
         if (!openForWrite) {
             throw new 
IllegalArgumentException(sm.getString("fileMessageFactory.cannotWrite"));
         }


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

Reply via email to