diff --git a/thermostat.go b/thermostat.go index 4e6b601..9694727 100644 --- a/thermostat.go +++ b/thermostat.go @@ -140,8 +140,8 @@ func RunThermostat(path string, sc chan<- State, wg *sync.WaitGroup) { if err != nil { log.Panicln(err) } - defer TurnOffSensors(*config) defer rpio.Close() + defer TurnOffSensors(*config) // Track if thermostats should run run := true