check for nil isolatedCpus before calling updateIsolated

Signed-off-by: david <davidventura27@gmail.com>
This commit is contained in:
david 2021-12-17 21:32:17 +01:00 committed by DavidVentura
parent 5340d1ec37
commit 840d32622f
1 changed files with 2 additions and 2 deletions

View File

@ -167,8 +167,8 @@ func (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {
if err := c.updateStat(ch); err != nil {
return err
}
if err := c.updateIsolated(ch); err != nil {
return err
if c.isolatedCpus != nil {
c.updateIsolated(ch)
}
return c.updateThermalThrottle(ch)
}