Log on warn level if the selector was recreated and remove multiple calls to SelectionKey.cancel()
This commit is contained in:
parent
dc8ff7e173
commit
49ad538aef
@ -188,8 +188,6 @@ abstract class AbstractNioWorker implements Worker {
|
||||
AbstractNioChannel<?> channel = (AbstractNioChannel<?>) att;
|
||||
close(channel, succeededFuture(channel));
|
||||
}
|
||||
key.cancel();
|
||||
|
||||
}
|
||||
try {
|
||||
// time to close the old selector as everything else is registered to the new one
|
||||
@ -197,7 +195,7 @@ abstract class AbstractNioWorker implements Worker {
|
||||
} catch (Throwable t) {
|
||||
logger.warn("Failed to close a selector.", t);
|
||||
}
|
||||
logger.debug("Recreated Selector because of possible jdk epoll(..) bug");
|
||||
logger.warn("Recreated Selector because of possible jdk epoll(..) bug");
|
||||
return newSelector;
|
||||
}
|
||||
|
||||
@ -271,7 +269,7 @@ abstract class AbstractNioWorker implements Worker {
|
||||
// returned before the minSelectTimeout elapsed with nothing select.
|
||||
// this may be the cause of the jdk epoll(..) bug, so increment the counter
|
||||
// which we use later to see if its really the jdk bug.
|
||||
selectReturnsImmediately++;
|
||||
selectReturnsImmediately ++;
|
||||
} else {
|
||||
selectReturnsImmediately = 0;
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
|
||||
// returned before the minSelectTimeout elapsed with nothing select.
|
||||
// this may be the cause of the jdk epoll(..) bug, so increment the counter
|
||||
// which we use later to see if its really the jdk bug.
|
||||
selectReturnsImmediately++;
|
||||
selectReturnsImmediately ++;
|
||||
} else {
|
||||
selectReturnsImmediately = 0;
|
||||
}
|
||||
@ -471,7 +471,6 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
|
||||
// close the Channel if we can't register it
|
||||
close(key);
|
||||
}
|
||||
key.cancel();
|
||||
}
|
||||
|
||||
try {
|
||||
@ -480,7 +479,7 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
|
||||
} catch (Throwable t) {
|
||||
logger.warn("Failed to close a selector.", t);
|
||||
}
|
||||
logger.debug("Recreated Selector because of possible jdk epoll(..) bug");
|
||||
logger.warn("Recreated Selector because of possible jdk epoll(..) bug");
|
||||
return newSelector;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user