Author: markt Date: Thu Jun 2 13:10:52 2016 New Revision: 1746556 URL: http://svn.apache.org/viewvc?rev=1746556&view=rev Log: Simplify. Remove unnecessary method
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 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=1746556&r1=1746555&r2=1746556&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Jun 2 13:10:52 2016 @@ -410,15 +410,6 @@ public class NioEndpoint extends Abstrac } - /** - * Returns true if a worker thread is available for processing. - * @return boolean - */ - protected boolean isWorkerAvailable() { - return true; - } - - @Override protected Log getLog() { return log; @@ -852,24 +843,22 @@ public class NioEndpoint extends Abstrac if ( attachment.getSendfileData() != null ) { processSendfile(sk,attachment, false); } else { - if ( isWorkerAvailable() ) { - unreg(sk, attachment, sk.readyOps()); - boolean closeSocket = false; - // Read goes before write - if (sk.isReadable()) { - if (!processSocket(attachment, SocketEvent.OPEN_READ, true)) { - closeSocket = true; - } - } - if (!closeSocket && sk.isWritable()) { - if (!processSocket(attachment, SocketEvent.OPEN_WRITE, true)) { - closeSocket = true; - } + unreg(sk, attachment, sk.readyOps()); + boolean closeSocket = false; + // Read goes before write + if (sk.isReadable()) { + if (!processSocket(attachment, SocketEvent.OPEN_READ, true)) { + closeSocket = true; } - if (closeSocket) { - cancelledKey(sk); + } + if (!closeSocket && sk.isWritable()) { + if (!processSocket(attachment, SocketEvent.OPEN_WRITE, true)) { + closeSocket = true; } } + if (closeSocket) { + cancelledKey(sk); + } } } } else { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org