This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new 8578aef Fix potential concurrency issue for non-blocking IO flags
during recycle
8578aef is described below
commit 8578aefc7f238413c2bdadbfaac6a9b2acfa3cec
Author: Mark Thomas <[email protected]>
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 9e7eaf3..bd87ce9 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -625,8 +625,10 @@ public final class Response {
headers.clear();
// 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: [email protected]
For additional commands, e-mail: [email protected]