Skip to content

Commit

Permalink
Merge pull request #41 from kai101/master
Browse files Browse the repository at this point in the history
fix error assignment.
  • Loading branch information
eheydrick authored Aug 1, 2016
2 parents e4120cd + 0798672 commit 756c395
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/check-ping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ class CheckPING < Sensu::Plugin::Check::CLI
def run
result = []
pt = Net::Ping::External.new(config[:host], nil, config[:timeout])
config[:ipv6] ? (ping = pt.ping6) : (ping = pt.ping)

config[:count].times do |i|
sleep(config[:interval]) unless i == 0
result[i] = ping
result[i] = config[:ipv6] ? pt.ping6 : pt.ping
end

successful_count = result.count(true)
Expand Down

0 comments on commit 756c395

Please sign in to comment.