Author: fhanik
Date: Fri Apr 13 08:32:19 2007
New Revision: 528524
URL: http://svn.apache.org/viewvc?view=rev&rev=528524
Log:
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
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?view=diff&rev=528524&r1=528523&r2=528524
==============================================================================
---
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
(original)
+++
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Fri Apr 13 08:32:19 2007
@@ -603,7 +603,7 @@
}
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();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]