Skip to content

Commit 1179759

Browse files
vivien-applepull[bot]
authored andcommitted
[SetuopCodePairer] Add a comment to explain why device discovered over BLE are using emplace_front and not emplace_back (#24058)
1 parent 8e82df0 commit 1179759

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/controller/SetUpCodePairer.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ void SetUpCodePairer::OnDiscoveredDeviceOverBle(BLE_CONNECTION_OBJECT connObj)
272272

273273
mWaitingForDiscovery[kBLETransport] = false;
274274

275+
// In order to not wait for all the possible addresses discovered over mdns to
276+
// be tried before trying to connect over BLE, the discovered connection object is
277+
// inserted at the beginning of the list.
278+
//
279+
// It makes it the 'next' thing to try to connect to if there are already some
280+
// discovered parameters in the list.
275281
mDiscoveredParameters.emplace_front(connObj);
276282
ConnectToDiscoveredDevice();
277283
}

0 commit comments

Comments
 (0)