lib/new_relic/agent/agent.rb in newrelic_rpm-3.6.8.164 vs lib/new_relic/agent/agent.rb in newrelic_rpm-3.6.8.168

- old
+ new

@@ -600,17 +600,10 @@ def handle_force_disconnect(error) ::NewRelic::Agent.logger.warn "New Relic forced this agent to disconnect (#{error.message})" disconnect end - # there is a problem with connecting to the server, so we - # stop trying to connect and shut down the agent - def handle_server_connection_problem(error) - ::NewRelic::Agent.logger.error "Unable to establish connection with the server.", error - disconnect - end - # Handles an unknown error in the worker thread by logging # it and disconnecting the agent, since we are now in an # unknown state. def handle_other_error(error) ::NewRelic::Agent.logger.error "Unhandled error in worker thread, disconnecting this agent process:" @@ -628,12 +621,10 @@ rescue NewRelic::Agent::ForceRestartException => e handle_force_restart(e) retry rescue NewRelic::Agent::ForceDisconnectException => e handle_force_disconnect(e) - rescue NewRelic::Agent::ServerConnectionException => e - handle_server_connection_problem(e) rescue => e handle_other_error(e) end # This is the method that is run in a new thread in order to @@ -911,10 +902,10 @@ @connect_state = :connected rescue NewRelic::Agent::LicenseException => e handle_license_error(e) rescue NewRelic::Agent::UnrecoverableAgentException => e handle_unrecoverable_agent_error(e) - rescue Timeout::Error => e + rescue Timeout::Error, NewRelic::Agent::ServerConnectionException => e log_error(e) if opts[:keep_retrying] note_connect_failure ::NewRelic::Agent.logger.warn "Will re-attempt in #{connect_retry_period} seconds" sleep connect_retry_period