This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 0f729cf NIO needs a write loop as demonstrated by BZ63949 0f729cf is described below commit 0f729cf59b2c49643777c56c7ad01402832611ea Author: remm <r...@apache.org> AuthorDate: Wed Dec 4 09:05:12 2019 +0100 NIO needs a write loop as demonstrated by BZ63949 Adapt commit f5f2b62670f972fc6a857788084e4352f2d4cd87 --- java/org/apache/tomcat/util/net/NioEndpoint.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index e9cef65..6a0bfdc 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1490,7 +1490,15 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel> } } if (doWrite) { - nBytes = getSocket().write(buffers, offset, length); + long n = 0; + do { + n = getSocket().write(buffers, offset, length); + if (n == -1) { + nBytes = n; + } else { + nBytes += n; + } + } while (n > 0); updateLastWrite(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org