Author: remm Date: Mon Sep 14 13:31:30 2015 New Revision: 1702949 URL: http://svn.apache.org/r1702949 Log: Improve processing for async IO errors so that it goes through the normal code (including the "free" buffer method).
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.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=1702949&r1=1702948&r2=1702949&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Mon Sep 14 13:31:30 2015 @@ -1639,6 +1639,8 @@ public class Nio2Endpoint extends Abstra if (socket.getSocket().isHandshakeComplete() || status == SocketStatus.STOP) { handshake = 0; + } else if (status == SocketStatus.ERROR) { + handshake = -1; } else { handshake = socket.getSocket().handshake(); // The handshake process reads/writes from/to the 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=1702949&r1=1702948&r2=1702949&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java Mon Sep 14 13:31:30 2015 @@ -92,7 +92,7 @@ public class SecureNio2Channel extends N } @Override public void failed(Throwable exc, SocketWrapperBase<Nio2Channel> attachment) { - endpoint.closeSocket(attachment); + endpoint.processSocket(attachment, SocketStatus.ERROR, false); } }; handshakeWriteCompletionHandler = new CompletionHandler<Integer, SocketWrapperBase<Nio2Channel>>() { @@ -106,7 +106,7 @@ public class SecureNio2Channel extends N } @Override public void failed(Throwable exc, SocketWrapperBase<Nio2Channel> attachment) { - endpoint.closeSocket(attachment); + endpoint.processSocket(attachment, SocketStatus.ERROR, false); } }; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org