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

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new ef8b1a7  Fix potential concurrency issue for non-blocking IO flags 
during recycle
ef8b1a7 is described below

commit ef8b1a759f1a3b7f7f4038836a80a409fae1ff3a
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 7147ce1..65fc3c7 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -644,8 +644,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