Device closing was moved
This commit is contained in:
@@ -20,12 +20,13 @@ func sendCommand(command string, channel, value, r, g, b int) error {
|
||||
}
|
||||
|
||||
n, err := noolite.DefaultNooliteAdapter()
|
||||
defer n.Close()
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer n.Close()
|
||||
|
||||
if command == "set" {
|
||||
if value != 0 {
|
||||
return n.SetBrightnesValue(channel, value)
|
||||
|
||||
Reference in New Issue
Block a user