tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r528524 - /tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Date Fri, 13 Apr 2007 15:32:20 GMT
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message