You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2014/03/14 16:02:19 UTC
svn commit: r1577561 -
/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
Author: remm
Date: Fri Mar 14 15:02:18 2014
New Revision: 1577561
URL: http://svn.apache.org/r1577561
Log:
Improve the FutureWrite logic so that writing starts when creating it, and then will recurse on get until the content is actually written.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java?rev=1577561&r1=1577560&r2=1577561&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java Fri Mar 14 15:02:18 2014
@@ -581,6 +581,7 @@ public class SecureNio2Channel extends N
t = new IOException("Channel is in closing state.");
return;
}
+ wrap();
}
@Override
public boolean cancel(boolean mayInterruptIfRunning) {
@@ -596,12 +597,12 @@ public class SecureNio2Channel extends N
}
@Override
public Integer get() throws InterruptedException, ExecutionException {
- wrap();
if (t != null) {
throw new ExecutionException(t);
}
integer.get();
if (written == 0) {
+ wrap();
return get();
} else {
return Integer.valueOf(written);
@@ -611,12 +612,12 @@ public class SecureNio2Channel extends N
public Integer get(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException,
TimeoutException {
- wrap();
if (t != null) {
throw new ExecutionException(t);
}
integer.get(timeout, unit);
if (written == 0) {
+ wrap();
return get(timeout, unit);
} else {
return Integer.valueOf(written);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org