edrosten / libblepp

Modern clean C++ Bluetooth Low Energy on Linux without the Bluez DBUS API
Other
239 stars 62 forks source link

Timeout if no connection #47

Open decay29 opened 4 years ago

decay29 commented 4 years ago

So, if I run the temperature example and do not connect a thermometer within about a minute I get

error 1570640902.713533: Error on line: 296 (src/blestatemachine.cc): Operation now in progress terminate called after throwing an instance of 'std::logic_error' what(): Trying to read socket while connecting Aborted

In my own code, I catch the exception and reconnect, but then it seems to give up after the second attempt.