Skip to content

Commit

Permalink
fix: pass the SNMP timeout to gosnmp arguments (#84)
Browse files Browse the repository at this point in the history
* I made the timeout feature of SNMP configurable with having a default value of 5 seconds. Also changed the tests to accommodate this change. Also corrected some typos.

* Adding the information about timeout flag in the README.md

* Passing the timeout parameter to the SNMPArguments. (#2)
  • Loading branch information
shayyxi authored Aug 2, 2021
1 parent 301f643 commit 8009ebc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions trapsender/trap_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ func (trapSender TrapSender) connect() (*snmpgo.SNMP, error) {
snmpArguments := snmpgo.SNMPArguments{
Address: trapSender.configuration.SNMPDestination,
Retries: trapSender.configuration.SNMPRetries,
Timeout: trapSender.configuration.SNMPTimeout,
}

if trapSender.configuration.SNMPVersion == "V2c" {
Expand Down

0 comments on commit 8009ebc

Please sign in to comment.