Author: kkolinko Date: Thu Jan 10 01:31:39 2013 New Revision: 1431172 URL: http://svn.apache.org/viewvc?rev=1431172&view=rev Log: Merged revisions 1431171 from tomcat/trunk: Fix release of processors in AjpNioProtocol. Wrong object was used as a key in the connections map.
"connections" is "Map<S,Processor<S>>". The key in the map is socket, not its wrapper. Found this in a review inspired by a similar fix in r1426662. (r1426662 itself is specific to Tomcat 8 and does not need a backport). Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1431171 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java?rev=1431172&r1=1431171&r2=1431172&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Thu Jan 10 01:31:39 2013 @@ -143,7 +143,8 @@ public class AjpNioProtocol extends Abst */ @Override public void release(SocketWrapper<NioChannel> socket) { - Processor<NioChannel> processor = connections.remove(socket); + Processor<NioChannel> processor = + connections.remove(socket.getSocket()); if (processor != null) { processor.recycle(true); recycledProcessors.offer(processor); Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1431172&r1=1431171&r2=1431172&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jan 10 01:31:39 2013 @@ -146,6 +146,10 @@ a Reader to read a request body with a BOM for those encodings that require byte order marks. (markt) </fix> + <fix> + Fix release of processors in <code>AjpNioProtocol</code>. Wrong object + was used as a key in the connections map. (kkolinko) + </fix> </changelog> </subsection> <subsection name="Jasper"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org