just create a new map

This commit is contained in:
Paolo Asperti 2021-12-09 11:45:14 +01:00
parent 5b4eb8b4ce
commit 5d207f17a1
Signed by: paspo
GPG Key ID: 06D46905D19D5182

View File

@ -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()
}