Author: markt
Date: Thu Dec 18 14:26:01 2014
New Revision: 1646466
URL: http://svn.apache.org/r1646466
Log:
Use the provided atomic method to replace the attachment and return a reference
to the old value.
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1646466&r1=1646465&r2=1646466&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu
Dec 18 14:26:01 2014
@@ -1091,10 +1091,11 @@ public class NioEndpoint extends Abstrac
return; // don't close on comet timeout
}
} else {
- processSocket(ka.getChannel(), status, false); //don't
dispatch if the lines below are cancelling the key
+ // Don't dispatch if the lines below are cancelling
the key
+ processSocket(ka.getChannel(), 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: [email protected]
For additional commands, e-mail: [email protected]