You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/02/27 16:01:20 UTC

svn commit: r1662706 - /tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java

Author: markt
Date: Fri Feb 27 15:01:20 2015
New Revision: 1662706

URL: http://svn.apache.org/r1662706
Log:
Fix infinite loop observed while running unit tests when write is called
with no data on the input side and wrapping also produces no data.
This is the non-timeout version of the fix that was previously applied
to get(long,TimeUnit)

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=1662706&r1=1662705&r2=1662706&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java Fri Feb 27 15:01:20 2015
@@ -646,8 +646,7 @@ public class SecureNio2Channel extends N
                 writePending = false;
                 throw new ExecutionException(t);
             }
-            integer.get();
-            if (written == 0) {
+            if (integer.get().intValue() > 0 && written == 0) {
                 wrap();
                 return get();
             } else {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org