Skip to content

Commit

Permalink
Fix error in timeout calculation
Browse files Browse the repository at this point in the history
 - This error caused the default timeout for the SNMP connection to always be `-999.99ms`
  • Loading branch information
martialblog committed Mar 15, 2024
1 parent 10ef6d2 commit a70e445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func main() {
client.SetTarget(*host)
client.SetPort(*port)
client.SetCommunity(*community)
client.SetTimeout(time.Duration(config.Timeout) - 1*time.Second)
client.SetTimeout(time.Duration(config.Timeout) * time.Second)
client.SetRetries(1)

version, err := snmp.VersionFromString(*protocol)
Expand Down

0 comments on commit a70e445

Please sign in to comment.