paypal / gatt

Gatt is a Go package for building Bluetooth Low Energy peripherals
BSD 3-Clause "New" or "Revised" License
1.12k stars 283 forks source link

WriteCharacteristic() blocks indefinitely on connection close #85

Open alexozer opened 7 years ago

alexozer commented 7 years ago

Happy new year!

On Linux, calling periph.WriteCharacteristic(characteristic, []byte{...}, true) after the connection to periph has been closed blocks indefinitely. This makes it impossible to guarantee we can let the goroutine calling WriteCharacteristic know when to stop calling it. Returning an error on write seems like better behavior.