Only update interestedOps if needed

This commit is contained in:
Norman Maurer 2013-02-10 20:42:40 +01:00
parent 775856b3db
commit 565e10e0db

View File

@ -141,8 +141,10 @@ public final class NioEventLoop extends SingleThreadEventLoop {
SelectionKey key = channel.selectionKey();
channel.writableTasks.offer(task);
if (!key.isWritable()) {
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
}
}
public void rebuildSelector() {
if (!inEventLoop()) {