Just add a comment to show that the code is related to #597

This commit is contained in:
norman 2012-09-13 10:25:59 +02:00
parent ded98ddaf9
commit 058dfd0a78

View File

@ -253,6 +253,9 @@ final class NioEventLoop extends SingleThreadEventLoop {
private void processSelectedKeys() {
Set<SelectionKey> selectedKeys = selector.selectedKeys();
// check if the set is empty and if so just return to not create garbage by
// creating a new Iterator every time even if there is nothing to process.
// See https://github.com/netty/netty/issues/597
if (selectedKeys.isEmpty()) {
return;
}