apache/tomcat — pull request #10 by hanyong (2014-06-09 04:32:17+00:00)
Title: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

In NioEndpoint, save and retrieve SelectionKey in KeyAttachment.
When the socket is closed by the interrupt,
the associated SelectionKey may be removed by the poller thread before async complete.
Then socket.keyFor() returns null, the connection count would not be reduced.
Save the key in the attachment could fix this.