You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/06/28 19:37:54 UTC
[tomcat] 02/03: Only need to check socket/network buffers for writes
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit e3cb239c5d669475dbc94dc23e9c74467a88be04
Author: Mark Thomas <ma...@apache.org>
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 041f2d4be1..ddcdcd39ab 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1661,7 +1661,7 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel>
}
}
if (nBytes != 0 || (!buffersArrayHasRemaining(buffers, offset, length) &&
- !socketOrNetworkBufferHasDataLeft())) {
+ (read || !socketOrNetworkBufferHasDataLeft()))) {
completionDone = false;
}
}
@@ -1670,7 +1670,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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org