Author: markt Date: Thu Dec 18 14:05:05 2014 New Revision: 1646460 URL: http://svn.apache.org/r1646460 Log: Use the provided atomic method to replace the attachment and return a reference to the old value.
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1646460&r1=1646459&r2=1646460&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Dec 18 14:05:05 2014 @@ -961,11 +961,11 @@ public class NioEndpoint extends Abstrac return; // don't close on comet timeout } } else { - // Don't dispatch if the lines below are canceling the key + // Don't dispatch if the lines below are cancelling the key processSocket(ka, status, false); } } - key.attach(null); + ka = (KeyAttachment) key.attach(null); if (ka!=null) handler.release(ka); else handler.release((SocketChannel)key.channel()); if (key.isValid()) key.cancel(); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org