add non block support
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 21 May 2007 09:56:48 +0000 (09:56 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 21 May 2007 09:56:48 +0000 (09:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@540094 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/SecureNioChannel.java

index 3593b37..2463f60 100644 (file)
@@ -103,7 +103,11 @@ public class SecureNioChannel extends NioChannel  {
      * @return boolean
      */
     public boolean flush(boolean block, Selector s, long timeout) throws IOException {
-        pool.write(netOutBuffer,this,s,timeout);
+        if (!block) {
+            flush(netOutBuffer);
+        } else {
+            pool.write(netOutBuffer, this, s, timeout);
+        }
         return !netOutBuffer.hasRemaining();
     }