Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect results in ping plugin #6581

Merged
merged 2 commits into from
Nov 5, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix incorrect results in ping plugin
In the last change, sending to a channel was overlooked, causing all
ping errors and packet sent count to be ignored.
  • Loading branch information
glinton committed Oct 25, 2019
commit 25a212c2bd5675eb8c0b37325511ea36876cae00
2 changes: 2 additions & 0 deletions plugins/inputs/ping/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,12 @@ func (p *Ping) pingToURLNative(destination string, acc telegraf.Accumulator) {
if strings.Contains(err.Error(), "not permitted") {
sent.sent = false
}
sents <- sent
return
}

resps <- resp
sents <- sent
}(i + 1)
}
}
Expand Down