[#2164] Only reregister SelectionKeys that are still valid
This commit is contained in:
parent
143951ac5f
commit
96f94cfcb1
@ -253,7 +253,7 @@ public final class NioEventLoop extends SingleThreadEventLoop {
|
|||||||
for (SelectionKey key: oldSelector.keys()) {
|
for (SelectionKey key: oldSelector.keys()) {
|
||||||
Object a = key.attachment();
|
Object a = key.attachment();
|
||||||
try {
|
try {
|
||||||
if (key.channel().keyFor(newSelector) != null) {
|
if (!key.isValid() || key.channel().keyFor(newSelector) != null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user