[#2164] Only reregister SelectionKeys that are still valid

This commit is contained in:
Norman Maurer 2014-01-29 07:18:29 +01:00
parent 9f7a9077d6
commit 80ed147652

View File

@ -253,7 +253,7 @@ public final class NioEventLoop extends SingleThreadEventLoop {
for (SelectionKey key: oldSelector.keys()) {
Object a = key.attachment();
try {
if (key.channel().keyFor(newSelector) != null) {
if (!key.isValid() || key.channel().keyFor(newSelector) != null) {
continue;
}