Skip to content

Commit

Permalink
Revert "fix: extra lock on init for safety (influxdata#10199)"
Browse files Browse the repository at this point in the history
This reverts commit b4ef429.
  • Loading branch information
nward committed Jan 12, 2022
1 parent 1b4ba85 commit 4dc2d92
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/snmp/translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ import (
// must init, append path for each directory, load module for every file
// or gosmi will fail without saying why
var m sync.Mutex
var once sync.Once

func LoadMibsFromPath(paths []string, log telegraf.Logger) error {
m.Lock()
defer m.Unlock()
once.Do(gosmi.Init)
gosmi.Init()
var folders []string
for _, mibPath := range paths {
gosmi.AppendPath(mibPath)
Expand Down

0 comments on commit 4dc2d92

Please sign in to comment.