tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1702984 - /tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
Date Mon, 14 Sep 2015 16:07:20 GMT
Author: markt
Date: Mon Sep 14 16:07:19 2015
New Revision: 1702984

URL: http://svn.apache.org/r1702984
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58372
Fix rare data races closed and suspended flags that could be triggered by async processing.

Modified:
    tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1702984&r1=1702983&r2=1702984&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Mon Sep 14 16:07:19
2015
@@ -94,7 +94,7 @@ public class OutputBuffer extends Writer
     /**
      * Flag which indicates if the output buffer is closed.
      */
-    private boolean closed = false;
+    private volatile boolean closed = false;
 
 
     /**
@@ -136,7 +136,7 @@ public class OutputBuffer extends Writer
     /**
      * Suspended flag. All output bytes will be swallowed if this is true.
      */
-    private boolean suspended = false;
+    private volatile boolean suspended = false;
 
 
     // ----------------------------------------------------------- Constructors



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message