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

commit fc194b72d1df42494c34cbc0937a42ad56559148
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu May 26 07:34:58 2022 +0100

    Only check state.hasOutboundRemaining() when writes complete.
    
    Review from remm
---
 java/org/apache/tomcat/util/net/SocketWrapperBase.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java 
b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index d95a31a15d..ecfc0b7aff 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -1089,7 +1089,7 @@ public abstract class SocketWrapperBase<E> {
                 boolean completion = true;
                 if (state.check != null) {
                     CompletionHandlerCall call = 
state.check.callHandler(currentState, state.buffers, state.offset, 
state.length);
-                    if (call == CompletionHandlerCall.CONTINUE || 
state.hasOutboundRemaining()) {
+                    if (call == CompletionHandlerCall.CONTINUE || (!state.read 
&& state.hasOutboundRemaining())) {
                         complete = false;
                     } else if (call == CompletionHandlerCall.NONE) {
                         completion = false;


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

Reply via email to