return findContextOutbound().invokeConnect(remoteAddress, localAddress, promise);
}
private ChannelFuture invokeConnect(
final SocketAddress remoteAddress, final SocketAddress localAddress, final ChannelPromise promise) {
EventExecutor executor = executor();
if (executor.inEventLoop()) {
invokeConnect0(remoteAddress, localAddress, promise);
} else {
executor.execute(new Runnable() {
@Override
public void run() {
invokeConnect0(remoteAddress, localAddress, promise);
}
});