Skip to content

Commit

Permalink
Fix incorrect timeout when SSH command fails (#25)
Browse files Browse the repository at this point in the history
Fixes #24

Co-authored-by: Victor Lavaud <[email protected]>
  • Loading branch information
qdii and qdii authored Nov 21, 2022
1 parent daadae0 commit 1681fda
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ func (c *Collector) collect() Metric {
var cmdBuffer bytes.Buffer
session.Stdout = &cmdBuffer
commanderror = session.Run(c.target.Command)
if commanderror != nil {
return
}
metric.Output = cmdBuffer.String()
}
if !timeout {
Expand Down

0 comments on commit 1681fda

Please sign in to comment.