tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <>
Subject Re: svn commit: r528524 - /tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/
Date Fri, 13 Apr 2007 16:51:01 GMT
Remy Maucherat wrote:
> wrote:
>> Author: fhanik
>> Date: Fri Apr 13 08:32:19 2007
>> New Revision: 528524
>> URL:
>> 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
> That's reverting 467065. I still don't see how concurrent writing in 
> the servlet is going to work (nothing is synced, and everything is 
> buffered to some extent).

Lets say you have two threads writing to the response (async write from 
both of them could end up on the line:
socket.getBufHandler().getWriteBuffer().put(buf, offset, length);

assuming nothing is synced in the path down to here, hence causing a 
buffer overflow,
Does that makes sense or am I smoking crack?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message