SINTEF-9012 / bglib

Java implementation of the BGAPI binary protocol for Bluegiga BLE112 Bluetooth low energy modules.
37 stars 14 forks source link

Promote IOException in sendPacket() #12

Closed rasendubi closed 9 years ago

rasendubi commented 9 years ago

When dongle is removed from computer, out.write() causes IOException to be thrown, however sendPacket() catches it and doesn't give any feedback for listeners or anybody else. That causes listeners to wait forever for event that will never occur because message was not sent.

This patch promotes IOException as IOError to upper layers, so that caller can handle it and react appropriately.