Skip to content
4 changes: 2 additions & 2 deletions lib/newrelic_security/agent/control/event_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def send_health
health.update_health_check
NewRelic::Security::Agent.agent.status_logger.add_healthcheck_in_last_healthchecks(health)
NewRelic::Security::Agent.agent.status_logger.create_snapshot
enqueue(health)
NewRelic::Security::Agent::Control::WebsocketClient.instance.send(health)
health = nil
end

Expand Down Expand Up @@ -120,7 +120,7 @@ def create_keep_alive_thread
Thread.current.name = "newrelic_security_healthcheck_thread"
while true do
sleep HEALTH_INTERVAL
send_health if NewRelic::Security::Agent.config[:enabled]
send_health if NewRelic::Security::Agent::Control::WebsocketClient.instance.is_open?
end
}
rescue Exception => exception
Expand Down