Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Aug 12, 2024
1 parent 31cd227 commit b2b8d89
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/datadog/di/probe_notifier_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ def start
return if defined?(@thread)
@thread = Thread.new do
loop do
if maybe_send
# Run next iteration immediately in case more work is
# in the queue
else
sleep 1
begin
if maybe_send
# Run next iteration immediately in case more work is
# in the queue
else
sleep 1
end
rescue => exc
warn "Error in probe notifier worker: #{exc.class}: #{exc}"
end
end
end
Expand Down

0 comments on commit b2b8d89

Please sign in to comment.