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,7 +141,9 @@ public final class NioEventLoop extends SingleThreadEventLoop {
SelectionKey key = channel.selectionKey();
channel.writableTasks.offer(task);
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
if (!key.isWritable()) {
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
}
}
public void rebuildSelector() {