Method: NewRelic::Agent::NewRelicService#prep_connection

Defined in:
lib/new_relic/agent/new_relic_service.rb

#prep_connectionObject

[View source]

357
358
359
360
361
362
# File 'lib/new_relic/agent/new_relic_service.rb', line 357

def prep_connection
  return Net::HTTP.new(@collector.name, @collector.port) unless Agent.config[:proxy_host]

  ::NewRelic::Agent.logger.debug("Using proxy server #{Agent.config[:proxy_host]}:#{Agent.config[:proxy_port]}")
  prep_proxy_connection
end