tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1478034 - /tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Date Wed, 01 May 2013 14:55:31 GMT
Author: markt
Date: Wed May  1 14:55:30 2013
New Revision: 1478034

URL: http://svn.apache.org/r1478034
Log:
Simplify

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?rev=1478034&r1=1478033&r2=1478034&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Wed May  1 14:55:30
2013
@@ -81,17 +81,12 @@ public class InternalNioOutputBuffer ext
     private NioSelectorPool pool;
 
     /**
-     * Flag used only for Comet requests/responses
-     */
-    protected volatile boolean blocking = true;
-
-    /**
      * Track if the byte buffer is flipped
      */
     protected volatile boolean flipped = false;
 
     /**
-     * For "non-blocking" writes use an external buffer
+     * For "non-blocking" writes use an external buffer.
      */
     protected volatile LinkedBlockingDeque<ByteBufferHolder> bufferedWrite = null;
 
@@ -421,7 +416,6 @@ public class InternalNioOutputBuffer ext
 
     @Override
     public void setBlocking(boolean blocking) {
-        this.blocking = blocking;
         if (blocking)
             bufferedWrite = null;
         else
@@ -433,7 +427,7 @@ public class InternalNioOutputBuffer ext
     }
 
     public boolean isBlocking() {
-        return blocking;
+        return bufferedWrite == null;
     }
 
     private boolean hasBufferedData() {



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


Mime
View raw message