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

markt 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 cd26d43  Fix potential concurrency issue for non-blocking IO flags 
during recycle
cd26d43 is described below

commit cd26d432a5af259ec2868bd69edcd278d5485c74
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Mar 4 14:55:00 2021 +0000

    Fix potential concurrency issue for non-blocking IO flags during recycle
---
 java/org/apache/coyote/Response.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/Response.java 
b/java/org/apache/coyote/Response.java
index d6eeb18..20eea91 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -627,8 +627,10 @@ public final class Response {
         trailerFieldsSupplier = null;
         // Servlet 3.1 non-blocking write listener
         listener = null;
-        fireListener = false;
-        registeredForWrite = false;
+        synchronized (nonBlockingStateLock) {
+            fireListener = false;
+            registeredForWrite = false;
+        }
 
         // update counters
         contentWritten=0;


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

Reply via email to