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 2015/01/29 20:12:15 UTC

svn commit: r1655813 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Author: markt
Date: Thu Jan 29 19:12:15 2015
New Revision: 1655813

URL: http://svn.apache.org/r1655813
Log:
Only force a flush on a blocking write.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1655813&r1=1655812&r2=1655813&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Jan 29 19:12:15 2015
@@ -1505,10 +1505,12 @@ public class NioEndpoint extends Abstrac
             try {
                 pool.write(socketBufferHandler.getWriteBuffer(), getSocket(),
                         selector, writeTimeout, block);
-                // Make sure we are flushed
-                do {
-                    if (getSocket().flush(true, selector, writeTimeout)) break;
-                } while (true);
+                if (block) {
+                    // Make sure we are flushed
+                    do {
+                        if (getSocket().flush(true, selector, writeTimeout)) break;
+                    } while (true);
+                }
             } 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