mirror of
https://github.com/kidoman/embd
synced 2025-07-01 19:18:08 +02:00
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 {
|
func (d *w1Device) Close() error {
|
||||||
d.bus.Mu.Lock()
|
|
||||||
defer d.bus.Mu.Unlock()
|
|
||||||
|
|
||||||
if !d.initialized {
|
if !d.initialized {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user