2015-01-08 14:11 GMT+01:00 <ma...@apache.org>: > Author: markt > Date: Thu Jan 8 13:10:59 2015 > New Revision: 1650280 > > URL: http://svn.apache.org/r1650280 > Log: > Fix failing unit test > testMessagesBlocking(org.apache.coyote.http11.upgrade.TestUpgrade) > > Modified: > tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java > > Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1650280&r1=1650279&r2=1650280&view=diff > > ============================================================================== > --- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java > (original) > +++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Thu > Jan 8 13:10:59 2015 > @@ -1099,9 +1099,7 @@ public class Nio2Endpoint extends Abstra > int thisTime = transfer(buf, off, len, > socketWriteBuffer); > len = len - thisTime; > off = off + thisTime; > - if (socketWriteBuffer.remaining() == 0) { > - flush(true); > - } > + flush(true); > } > > This doesn't look very good. Removing buffering = worse performance. This is probably because upgrade wouldn't deal with buffering as the message implies, so this could need an extra flag.
Rémy