Skip to content

Commit 2289749

Browse files
sagar-applepull[bot]
authored andcommitted
Store the PairedDeviceList as soon as a New Device is added (#6507)
1 parent 55a158c commit 2289749

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/controller/CHIPDeviceController.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,12 @@ void DeviceCommissioner::OnSessionEstablished()
921921
mPairedDevices.Insert(device->GetDeviceId());
922922
mPairedDevicesUpdated = true;
923923

924+
// Note - This assumes storage is synchronous, the device must be in storage before we can cleanup
925+
// the rendezvous session and mark pairing success
924926
PersistDevice(device);
927+
// Also persist the device list at this time
928+
// This makes sure that a newly added device is immediately available
929+
PersistDeviceList();
925930

926931
if (mPairingDelegate != nullptr)
927932
{

0 commit comments

Comments
 (0)