This write has to be synchronized since comet can write to the buffer and cause a...
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 13 Apr 2007 15:32:19 +0000 (15:32 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 13 Apr 2007 15:32:19 +0000 (15:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@528524 13f79535-47bb-0310-9956-ffa450edef68

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

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