From 8e177b51b190adf5ddb162c38eb6d7bebdbfb058 Mon Sep 17 00:00:00 2001 From: Mike Shoup Date: Mon, 1 Oct 2018 20:34:07 -0600 Subject: [PATCH] Fix a segmentation fault --- thermostat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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