Skip to content

Commit 3f10758

Browse files
mergify[bot]OlivierGrerestyled-commitsbzbarsky-apple
authored
Fix bug about fail-safe timer re-arm when using non-concurrent mode. (#42820) (#72385)
* Fix bug about fail-safe timer rearm when using non-concurrent mode. * Restyled by clang-format * Update src/controller/AutoCommissioner.h * fix * Restyled by clang-format * Update src/controller/CHIPDeviceController.cpp --------- (cherry picked from commit 7980901) Co-authored-by: Olivier LORENTE [ST] <34505085+OlivierGre@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
1 parent 0e3b86d commit 3f10758

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/controller/CHIPDeviceController.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,6 +2170,16 @@ void DeviceCommissioner::OnDeviceConnectionRetryFn(void * context, const ScopedN
21702170
self->GetCommissioningStage() == CommissioningStage::kFindOperationalForCommissioningComplete);
21712171
VerifyOrDie(self->mDeviceBeingCommissioned->GetDeviceId() == peerId.GetNodeId());
21722172

2173+
bool supportsConcurrent =
2174+
self->mCommissioningDelegate->GetCommissioningParameters().GetSupportsConcurrentConnection().ValueOr(true);
2175+
if (!supportsConcurrent)
2176+
{
2177+
// Concurrent mode not supported.
2178+
// We are in operational phase so the commissioning channel is not
2179+
// available anymore and it is not possible to re-arm the fail-safe timer.
2180+
return;
2181+
}
2182+
21732183
// We need to do the fail-safe arming over the PASE session.
21742184
auto * commissioneeDevice = self->FindCommissioneeDevice(peerId.GetNodeId());
21752185
if (!commissioneeDevice)

0 commit comments

Comments
 (0)