diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 1d0d36bd57f85e..e4b566f43b89db 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -2344,8 +2344,7 @@ void DeviceCommissioner::ContinueReadingCommissioningInfo(const CommissioningPar mReadCommissioningInfoProgress = kReadProgressNoFurtherAttributes; } - const auto timeout = MakeOptional(app::kExpectedIMProcessingTime); // TODO: Save timeout from PerformCommissioningStep? - SendCommissioningReadRequest(mDeviceBeingCommissioned, timeout, builder.paths(), builder.size()); + SendCommissioningReadRequest(mDeviceBeingCommissioned, mCommissioningStepTimeout, builder.paths(), builder.size()); } namespace { @@ -3004,9 +3003,10 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio params.GetCompletionStatus().err.AsString()); } - mCommissioningStage = step; - mCommissioningDelegate = delegate; - mDeviceBeingCommissioned = proxy; + mCommissioningStepTimeout = timeout; + mCommissioningStage = step; + mCommissioningDelegate = delegate; + mDeviceBeingCommissioned = proxy; // TODO: Extend timeouts to the DAC and Opcert requests. // TODO(cecille): We probably want something better than this for breadcrumbs. diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 3d4b2fa17201f4..cf22b70d1f487f 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -838,6 +838,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, DeviceProxy * mDeviceBeingCommissioned = nullptr; CommissioneeDeviceProxy * mDeviceInPASEEstablishment = nullptr; + Optional mCommissioningStepTimeout; // Note: For multi-interaction steps this is per interaction CommissioningStage mCommissioningStage = CommissioningStage::kSecurePairing; uint8_t mReadCommissioningInfoProgress = 0; // see ContinueReadingCommissioningInfo()