You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2019/12/03 20:17:56 UTC

[tomcat] branch master updated: Simplify code

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 ac4998b  Simplify code
ac4998b is described below

commit ac4998b10442f542c5db510fce1ba8a6187b338e
Author: remm <re...@apache.org>
AuthorDate: Tue Dec 3 21:17:45 2019 +0100

    Simplify code
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java
index fc61310..e9cef65 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -1255,14 +1255,9 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel>
                 }
                 try {
                     pool.write(from, socket, selector, writeTimeout);
-                    if (block) {
-                        // Make sure we are flushed
-                        do {
-                            if (socket.flush(true, selector, writeTimeout)) {
-                                break;
-                            }
-                        } while (true);
-                    }
+                    // Make sure we are flushed
+                    do {
+                    } while (!socket.flush(true, selector, writeTimeout));
                 } finally {
                     if (selector != null) {
                         pool.put(selector);


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