From c9c1aa98d77e1aa206b77bb298e98e23a1b733f1 Mon Sep 17 00:00:00 2001 From: fhanik Date: Fri, 13 Apr 2007 15:32:19 +0000 Subject: [PATCH] This write has to be synchronized since comet can write to the buffer and cause a buffer overflow if more than one thread is writing 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/coyote/http11/InternalNioOutputBuffer.java b/java/org/apache/coyote/http11/InternalNioOutputBuffer.java index dae3e5245..cf0c6bb88 100644 --- a/java/org/apache/coyote/http11/InternalNioOutputBuffer.java +++ b/java/org/apache/coyote/http11/InternalNioOutputBuffer.java @@ -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(); } -- 2.11.0