final OptionMap options = this.channelCreationOpts.get(connectionName) == null ? OptionMap.EMPTY : this.channelCreationOpts.get(connectionName);
Connection connection = null;
final ReconnectHandler reconnectHandler = new OutboundConnectionReconnectHandler(serviceRegistry, entry.getKey(), context, connectionTimeout, options);
try {
final IoFuture<Connection> futureConnection = outboundConnectionService.connect();
connection = IoFutureHelper.get(futureConnection, connectionTimeout, TimeUnit.MILLISECONDS);
} catch (Exception e) {
// just log a message and register a reconnect handler
logger.debug("Failed to create a connection for " + connectionName + ". A reconnect handler will be added to the client context", e);