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;
|
AbstractNioChannel<?> channel = (AbstractNioChannel<?>) att;
|
||||||
close(channel, succeededFuture(channel));
|
close(channel, succeededFuture(channel));
|
||||||
}
|
}
|
||||||
key.cancel();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// time to close the old selector as everything else is registered to the new one
|
// 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) {
|
} catch (Throwable t) {
|
||||||
logger.warn("Failed to close a selector.", 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;
|
return newSelector;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,7 +269,7 @@ abstract class AbstractNioWorker implements Worker {
|
|||||||
// returned before the minSelectTimeout elapsed with nothing select.
|
// returned before the minSelectTimeout elapsed with nothing select.
|
||||||
// this may be the cause of the jdk epoll(..) bug, so increment the counter
|
// 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.
|
// which we use later to see if its really the jdk bug.
|
||||||
selectReturnsImmediately++;
|
selectReturnsImmediately ++;
|
||||||
} else {
|
} else {
|
||||||
selectReturnsImmediately = 0;
|
selectReturnsImmediately = 0;
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
|
|||||||
// returned before the minSelectTimeout elapsed with nothing select.
|
// returned before the minSelectTimeout elapsed with nothing select.
|
||||||
// this may be the cause of the jdk epoll(..) bug, so increment the counter
|
// 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.
|
// which we use later to see if its really the jdk bug.
|
||||||
selectReturnsImmediately++;
|
selectReturnsImmediately ++;
|
||||||
} else {
|
} else {
|
||||||
selectReturnsImmediately = 0;
|
selectReturnsImmediately = 0;
|
||||||
}
|
}
|
||||||
@ -471,7 +471,6 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
|
|||||||
// close the Channel if we can't register it
|
// close the Channel if we can't register it
|
||||||
close(key);
|
close(key);
|
||||||
}
|
}
|
||||||
key.cancel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -480,7 +479,7 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
|
|||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
logger.warn("Failed to close a selector.", 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;
|
return newSelector;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user