summaryrefslogtreecommitdiffstats
path: root/devices
diff options
context:
space:
mode:
Diffstat (limited to 'devices')
-rw-r--r--devices/temp_nix.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/devices/temp_nix.go b/devices/temp_nix.go
index b4ef681..70cf91c 100644
--- a/devices/temp_nix.go
+++ b/devices/temp_nix.go
@@ -51,11 +51,13 @@ func getTemps(temps map[string]int) map[string]error {
for _, attr := range data.Attrs {
if attr.Id == 194 {
temps[disk.Name+"_"+disk.Model] = int(attr.Value)
+ sm.Close()
}
}
case *smart.NVMeDevice:
data, _ := sm.ReadSMART()
temps[disk.Name+"_"+disk.Model] = int(data.Temperature)
+ sm.Close()
default:
}
}