Author: remm
Date: Wed Jan  7 16:42:26 2015
New Revision: 1650114

URL: http://svn.apache.org/r1650114
Log:
Add flush to send ack in the NIO2 connector, and enable the test which now 
passes.

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java
    tomcat/trunk/test/org/apache/coyote/http11/TestInternalOutputBuffer.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java?rev=1650114&r1=1650113&r2=1650114&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java 
Wed Jan  7 16:42:26 2015
@@ -243,6 +243,7 @@ public class InternalNio2OutputBuffer ex
     public void sendAck() throws IOException {
         if (!committed) {
             addToBB(Constants.ACK_BYTES, 0, Constants.ACK_BYTES.length);
+            flushBuffer(true);
         }
     }
 

Modified: 
tomcat/trunk/test/org/apache/coyote/http11/TestInternalOutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/TestInternalOutputBuffer.java?rev=1650114&r1=1650113&r2=1650114&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http11/TestInternalOutputBuffer.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/http11/TestInternalOutputBuffer.java 
Wed Jan  7 16:42:26 2015
@@ -28,8 +28,6 @@ import org.apache.catalina.startup.Tomca
 public class TestInternalOutputBuffer extends TomcatBaseTest {
 
     @Test
-    @Ignore // Currently fails for NIO2 since that implementation writes the 
ACK
-            // to the buffers rather than directly to the socket.
     public void testSendAck() throws Exception {
         Tomcat tomcat = getTomcatInstance();
 



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

Reply via email to