mirror of
https://github.com/kidoman/embd
synced 2024-06-14 06:39:52 +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…
Reference in New Issue
Block a user