Log the cause of exceptionCaught event when failed to notify

This commit is contained in:
Trustin Lee 2012-06-12 17:25:27 +09:00
parent 3b562c917d
commit 3393629eed
2 changed files with 13 additions and 6 deletions

View File

@ -577,12 +577,19 @@ final class DefaultChannelHandlerContext extends DefaultAttributeMap implements
}
}
} else {
try {
executor.execute(new Runnable() {
@Override
public void run() {
fireExceptionCaught(cause);
}
});
} catch (Throwable t) {
if (logger.isWarnEnabled()) {
logger.warn("Failed to submit an exceptionCaught() event.", t);
logger.warn("The exceptionCaught() event that was failed to submit was:", cause);
}
}
}
} else {
logger.warn(

View File

@ -201,7 +201,7 @@ public abstract class MultithreadEventExecutor implements EventExecutor {
@Override
public boolean inEventLoop() {
return SingleThreadEventExecutor.currentEventLoop() != null;
throw new UnsupportedOperationException();
}
@Override