class Redis::Client

def establish_connection

def establish_connection
  server = @connector.resolve.dup
  @options[:host] = server[:host]
  @options[:port] = server[:port]
  @connection = @options[:driver].connect(server)
rescue TimeoutError
  raise CannotConnectError, "Timed out connecting to Redis on #{location}"
rescue Errno::ECONNREFUSED
  raise CannotConnectError, "Error connecting to Redis on #{location} (ECONNREFUSED)"
end