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 2013/05/14 01:27:55 UTC

svn commit: r1482146 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Author: markt
Date: Mon May 13 23:27:55 2013
New Revision: 1482146

URL: http://svn.apache.org/r1482146
Log:
Simplify. Review by kkolinko

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

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1482146&r1=1482145&r2=1482146&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Mon May 13 23:27:55 2013
@@ -1082,23 +1082,6 @@ public abstract class AbstractHttp11Proc
 
 
     /**
-     * Register the socket for write possible events of there is data in the
-     * output buffer still to write.
-     *
-     * @return <code>true</code> if the socket was registered for write possible
-     *         events, otherwise <code>false</code>
-     */
-    protected boolean registerForWrite() {
-        if (outputBuffer.hasDataToWrite()) {
-            registerForEvent(false, true);
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-
-    /**
      * Regsiter the socket for the specified events.
      *
      * @param read  Register the socket for read events
@@ -1555,7 +1538,8 @@ public abstract class AbstractHttp11Proc
                         outputBuffer.flushBuffer(false);
                     }
                     //return if we have more data to write
-                    if (registerForWrite()) {
+                    if (outputBuffer.hasDataToWrite()) {
+                        registerForEvent(false, true);
                         return SocketState.LONG;
                     }
                 } catch (IOException x) {



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