Only update interestedOps if needed
This commit is contained in:
parent
775856b3db
commit
565e10e0db
@ -141,7 +141,9 @@ public final class NioEventLoop extends SingleThreadEventLoop {
|
|||||||
|
|
||||||
SelectionKey key = channel.selectionKey();
|
SelectionKey key = channel.selectionKey();
|
||||||
channel.writableTasks.offer(task);
|
channel.writableTasks.offer(task);
|
||||||
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
|
if (!key.isWritable()) {
|
||||||
|
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rebuildSelector() {
|
public void rebuildSelector() {
|
||||||
|
Loading…
Reference in New Issue
Block a user