Skip to content

Commit

Permalink
Merge pull request #3 from yseto/fix-timeout
Browse files Browse the repository at this point in the history
fix timeout, fix sending jammed.
  • Loading branch information
yseto authored Mar 23, 2023
2 parents 7bc2f7e + a6367e7 commit 6ff7e75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func ticker(ctx context.Context, wg *sync.WaitGroup, c *config.Config, queue *ma
rawMetrics, err := collector.Do(ctx, c)
if err != nil {
log.Println(err.Error())
return
}
if !c.DryRun {
queue.Enqueue(rawMetrics)
Expand Down
2 changes: 1 addition & 1 deletion snmp/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func NewHandler(ctx context.Context, target, community string) Handler {
Transport: "udp",
Community: community,
Version: gosnmp.Version2c,
Timeout: time.Duration(2) * time.Second,
Timeout: time.Duration(10) * time.Second,
Retries: 3,
ExponentialTimeout: true,
MaxOids: gosnmp.MaxOids,
Expand Down

0 comments on commit 6ff7e75

Please sign in to comment.