From 7f90fef35466c20860ab171a279d9a4cb98d84b6 Mon Sep 17 00:00:00 2001 From: rare-magma Date: Tue, 7 Jun 2022 22:25:17 +0200 Subject: close smart stream after reading temperature --- devices/temp_nix.go | 2 ++ 1 file changed, 2 insertions(+) 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: } } -- cgit v1.2.3