lib/contrast/agent/thread_watcher.rb in contrast-agent-6.2.0 vs lib/contrast/agent/thread_watcher.rb in contrast-agent-6.3.0

- old
+ new

@@ -31,11 +31,11 @@ unless ::Contrast::CONTRAST_SERVICE.unnecessary? @heartbeat = Contrast::Agent::ServiceHeartbeat.new @messaging_queue = Contrast::Api::Communication::MessagingQueue.new end @reporter = Contrast::Agent::Reporter.new - @reporter_heartbeat = Contrast::Agent::ReporterHeartbeat.new if Contrast::Agent::Reporter.enabled? + @reporter_heartbeat = Contrast::Agent::ReporterHeartbeat.new @telemetry = Contrast::Agent::Telemetry::Base.new if Contrast::Agent::Telemetry::Base.enabled? end # @return [Hash, nil] map of process to thread startup status def startup! @@ -48,12 +48,9 @@ if Contrast::Agent::Telemetry::Base.enabled? telemetry_status = init_thread(telemetry_queue) @pids[Process.pid] = @pids[Process.pid] && telemetry_status end reporter_status = init_thread(reporter) - - return @pids unless Contrast::Agent::Reporter.enabled? - reporter_heartbeat_status = init_thread(reporter_heartbeat) @pids[Process.pid] = @pids[Process.pid] && reporter_status && reporter_heartbeat_status @pids end