mirror of https://github.com/kidoman/embd
fixed locking when closing 1-wire bus
This commit is contained in:
parent
4a75b30fcc
commit
6e7e0c31bd
|
@ -180,8 +180,6 @@ func (b *w1Bus) Close() error {
|
|||
}
|
||||
|
||||
func (d *w1Device) Close() error {
|
||||
d.bus.Mu.Lock()
|
||||
defer d.bus.Mu.Unlock()
|
||||
|
||||
if !d.initialized {
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue