Close unregistred digitalpins

This commit is contained in:
Felipe Ramos (perenecabuto) 2016-09-10 22:31:52 -03:00
parent bfcd1345fe
commit 1a49faafdd
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ package generic
import (
"errors"
"fmt"
"log"
"os"
"path"
"strconv"
@ -233,7 +234,7 @@ func (p *digitalPin) Close() error {
}
if err := p.drv.Unregister(p.id); err != nil {
return err
log.Println("Driver unregister error:", err.Error())
}
if !p.initialized {