Issue #3989 - Cleaning up ManagedSelector.onSelectFailed

+ Based on PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2019-09-10 03:46:26 -05:00
parent f6aea22979
commit 68382b9549

View File

@ -123,23 +123,11 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
start._started.await();
}
protected void onSelectFailed(Throwable cause) throws Exception
protected void onSelectFailed(Throwable cause)
{
// override to change behavior
}
private void notifySelectFailed(Throwable cause)
{
try
{
onSelectFailed(cause);
}
catch (Throwable x)
{
LOG.info("Failure while calling onSelectFailed()", x);
}
}
public int size()
{
Selector s = _selector;
@ -520,7 +508,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
if (isRunning())
{
LOG.warn("Fatal select() failure", x);
notifySelectFailed(x);
onSelectFailed(x);
}
else
{