Author: markt
Date: Fri Jan 9 21:01:27 2015
New Revision: 1650665
URL: http://svn.apache.org/r1650665
Log:
Trivial optimisation for blocking writes.
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=1650665&r1=1650664&r2=1650665&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Fri Jan 9
21:01:27 2015
@@ -1114,7 +1114,7 @@ public class Nio2Endpoint extends Abstra
if (block) {
try {
- while (len > 0) {
+ do {
int thisTime = transfer(buf, off, len,
socketWriteBuffer);
len = len - thisTime;
off = off + thisTime;
@@ -1125,7 +1125,7 @@ public class Nio2Endpoint extends Abstra
}
}
socketWriteBuffer.clear();
- }
+ } while (len > 0);
} catch (ExecutionException e) {
if (e.getCause() instanceof IOException) {
throw (IOException) e.getCause();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]