This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit fdd20c32e52613058c19d3d47f3cf74566a0a078 Author: Mark Thomas <[email protected]> AuthorDate: Tue Jun 28 19:51:28 2022 +0100 Only need to check socket/network buffers for writes --- java/org/apache/tomcat/util/net/NioEndpoint.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index d4e9d4ec52..ae8d64e6cd 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1638,7 +1638,7 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel> } } if (nBytes != 0 || (!buffersArrayHasRemaining(buffers, offset, length) && - !socketOrNetworkBufferHasDataLeft())) { + (read || !socketOrNetworkBufferHasDataLeft()))) { completionDone = false; } } @@ -1647,7 +1647,7 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel> } } if (nBytes > 0 || (nBytes == 0 && !buffersArrayHasRemaining(buffers, offset, length) && - !socketOrNetworkBufferHasDataLeft())) { + (read || !socketOrNetworkBufferHasDataLeft()))) { // The bytes processed are only updated in the completion handler completion.completed(Long.valueOf(nBytes), this); } else if (nBytes < 0 || getError() != null) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
