Only update interestedOps if needed
This commit is contained in:
parent
775856b3db
commit
565e10e0db
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user