diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index 6be757b1a7f312..89d8c4bfae318e 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -545,10 +545,17 @@ void AutoCommissioner::PauseCommissioning() CHIP_ERROR AutoCommissioner::ResumeCommissioning() { - VerifyOrReturnError(mPausedStage != CommissioningStage::kError, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mCommissioningPaused, CHIP_ERROR_INCORRECT_STATE); + mCommissioningPaused = false; + + // if no new step was attempted + if (mPausedStage == CommissioningStage::kError) + { + return CHIP_NO_ERROR; + } + CommissioningStage nextStage = mPausedStage; mPausedStage = CommissioningStage::kError; - mCommissioningPaused = false; return PerformStep(nextStage); } diff --git a/src/controller/java/src/chip/devicecontroller/ControllerParams.java b/src/controller/java/src/chip/devicecontroller/ControllerParams.java index 1133ae52f80a53..87fb85a375adf1 100644 --- a/src/controller/java/src/chip/devicecontroller/ControllerParams.java +++ b/src/controller/java/src/chip/devicecontroller/ControllerParams.java @@ -115,7 +115,7 @@ public Builder setControllerVendorId(int controllerVendorId) { this.controllerVendorId = controllerVendorId; return this; } - + public Builder setFailsafeTimerSeconds(int failsafeTimerSeconds) { if (failsafeTimerSeconds < 1 || failsafeTimerSeconds > 900) { throw new IllegalArgumentException("failsafeTimerSeconds must be between 0 and 900");