final ChannelHandlerContext handlerContext = pipeline.context(timeoutHandler);
EventExecutor executor = handlerContext.executor();
// Since, we are calling the handler directly, we need to make sure, it is in the owner eventloop, else it
// can get concurrent callbacks.
if (executor.inEventLoop()) {
disableHandler(timeoutHandler, handlerContext);
} else {
executor.submit(new Callable<Object>() {
@Override