livoxProto1: Connecting to bcast-advertised device works :)
We tested it. It's important to note that between test runs, we need to take into account the fact that the Avia stops sending bcast adverts when it's been handshaken. So the retry-delay-ms may be longer due to the fact that the Avia may not be sending adverts for a good portion of that retry-delay-ms time.
This commit is contained in:
@@ -129,6 +129,14 @@ void Device::connect()
|
||||
return;
|
||||
}
|
||||
|
||||
/** FIXME:
|
||||
* This won't work unless we return control to the ComponentThread's run()
|
||||
* loop during the retry-delay time so that the ComponentThread can actually
|
||||
* run the BroadcastListener's recv() calls and actually receive the
|
||||
* device's broadcast messages.
|
||||
* Think about ways to perhaps make all of this asynchronous. The main issue
|
||||
* is that this whole sequence is synchronous.
|
||||
*/
|
||||
// Wait retry delay, then try known device again
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(retryDelayMs));
|
||||
if (connectToKnownDevice()) {
|
||||
|
||||
Reference in New Issue
Block a user