Author: remm Date: Mon Feb 15 15:51:15 2016 New Revision: 1730550 URL: http://svn.apache.org/viewvc?rev=1730550&view=rev Log: Fix bad processing of handshake errors in NIO2.
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java tomcat/trunk/webapps/docs/changelog.xml 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=1730550&r1=1730549&r2=1730550&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Mon Feb 15 15:51:15 2016 @@ -1666,7 +1666,9 @@ public class Nio2Endpoint extends Abstra if (socket.getSocket() != null) { // For STOP there is no point trying to handshake as the // Poller has been stopped. - if (socket.getSocket().isHandshakeComplete() || + if (!socket.getSocket().isHandshakeComplete() && status == SocketEvent.ERROR) { + handshake = -1; + } else if (socket.getSocket().isHandshakeComplete() || status == SocketEvent.STOP || status == SocketEvent.ERROR) { handshake = 0; Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1730550&r1=1730549&r2=1730550&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Feb 15 15:51:15 2016 @@ -84,6 +84,9 @@ Handle the case in the NIO2 connector where the required TLS buffer sizes increase after the connection has been initiated. (markt/remm) </fix> + <fix> + Bad processing of handshake errors in NIO2. (remm) + </fix> </changelog> </subsection> <subsection name="WebSocket"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org