[#1836] Add comment to explain why read is triggered

This commit is contained in:
Norman Maurer 2013-09-17 06:58:23 +02:00
parent 335f3807a5
commit 8dc57f6933

View File

@ -474,6 +474,8 @@ public final class NioEventLoop extends SingleThreadEventLoop {
try {
int readyOps = k.readyOps();
// Also check for readOps of 0 to workaround possible JDK bug which may otherwise lead
// to a spin loop
if ((readyOps & (SelectionKey.OP_READ | SelectionKey.OP_ACCEPT)) != 0 || readyOps == 0) {
unsafe.read();
if (!ch.isOpen()) {