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

commit 89e16ba72a5b7c56ac5120b6a46da783fe7947cd
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Mar 22 21:51:24 2021 +0000

    Refactor onDataAvailable() in preparation for fixing BZ 64771
    
    https://bz.apache.org/bugzilla/show_bug.cgi?id=64771
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 2 +-
 java/org/apache/coyote/Request.java                   | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 9d06af9..766c11f 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -218,7 +218,7 @@ public class CoyoteAdapter implements Adapter {
                         // onAllDataRead() event. Therefore, make sure
                         // onDataAvailable() is not called in this case.
                         if (!request.isFinished()) {
-                            readListener.onDataAvailable();
+                            req.onDataAvailable();
                         }
                         if (request.isFinished() && 
req.sendAllDataReadEvent()) {
                             readListener.onAllDataRead();
diff --git a/java/org/apache/coyote/Request.java 
b/java/org/apache/coyote/Request.java
index e930b0e..8f8554e 100644
--- a/java/org/apache/coyote/Request.java
+++ b/java/org/apache/coyote/Request.java
@@ -215,6 +215,10 @@ public final class Request {
         return result.get();
     }
 
+    public void onDataAvailable() throws IOException {
+        listener.onDataAvailable();
+    }
+
 
     private final AtomicBoolean allDataReadEventSent = new 
AtomicBoolean(false);
 

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

Reply via email to