Author: markt Date: Tue Dec 8 20:19:28 2015 New Revision: 1718690 URL: http://svn.apache.org/viewvc?rev=1718690&view=rev Log: Non-blocking should throw an EOFException on EOF as well.
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1718690&r1=1718689&r2=1718690&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Dec 8 20:19:28 2015 @@ -16,6 +16,7 @@ */ package org.apache.tomcat.util.net; +import java.io.EOFException; import java.io.File; import java.io.FileInputStream; import java.io.IOException; @@ -1267,6 +1268,9 @@ public class NioEndpoint extends Abstrac } } else { nRead = channel.read(socketBufferHandler.getReadBuffer()); + if (nRead == -1) { + throw new EOFException(); + } } return nRead; } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1718690&r1=1718689&r2=1718690&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Dec 8 20:19:28 2015 @@ -137,6 +137,10 @@ Improve OpenSSL keystore/truststore configuration by using the code from the JSSE implementation. (remm, jfclere) </fix> + <fix> + Fix a potential loop when a client drops the connection unexpectedly. + (markt) + </fix> </changelog> </subsection> <subsection name="Jasper"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org