mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 12:37:25 +01:00
Update likwidMetric.go
Fixes a potential bug when `fsnotify.NewWatcher()` fails with an error
This commit is contained in:
parent
e425b2c38e
commit
fc19b2b9a5
@ -344,6 +344,7 @@ func (m *LikwidCollector) takeMeasurement(evidx int, evset LikwidEventsetConfig,
|
||||
watcher, err := fsnotify.NewWatcher()
|
||||
if err != nil {
|
||||
cclog.ComponentError(m.name, err.Error())
|
||||
return true, err
|
||||
}
|
||||
defer watcher.Close()
|
||||
if len(m.config.LockfilePath) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user