From 5d207f17a1b202739e6e3db202f4aa85eeb151a9 Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Thu, 9 Dec 2021 11:45:14 +0100 Subject: [PATCH] just create a new map --- src/ups/ups.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ups/ups.go b/src/ups/ups.go index 7c4afb3..f2bb234 100644 --- a/src/ups/ups.go +++ b/src/ups/ups.go @@ -82,9 +82,6 @@ func Reconfigure() { syslog.Notice("UPS disconnected") events.FireEvent("ups_disconnected") Connected = false - for key, _ := range Vars { - delete(Vars, key) - } - // Vars = make(map[string]nut.Variable) + Vars = make(map[string]nut.Variable) go UpsConnect() }