if the flush is not guaranteed, then try again
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 13 Apr 2007 15:33:44 +0000 (15:33 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 13 Apr 2007 15:33:44 +0000 (15:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@528526 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/InternalNioOutputBuffer.java

index cf0c6bb..c37fc61 100644 (file)
@@ -604,7 +604,7 @@ public class InternalNioOutputBuffer
 
     int total = 0;
     private synchronized void addToBB(byte[] buf, int offset, int length) throws IOException {
-        if (socket.getBufHandler().getWriteBuffer().remaining() < length) {
+        while (socket.getBufHandler().getWriteBuffer().remaining() < length) {
             flushBuffer();
         }
         socket.getBufHandler().getWriteBuffer().put(buf, offset, length);