Skip to content

Commit

Permalink
CommissioneeDeviceProxy fix. (#13482)
Browse files Browse the repository at this point in the history
Added a review comment fix, but the logic is not correct due to an
early exit on the load function. This didn't show up when testing
because the python tool caches the proxy and doesn't need to re-look
up the pairing.
  • Loading branch information
cecille authored Jan 12, 2022
1 parent cd25649 commit 6e7ad99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/controller/CommissioneeDeviceProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ CHIP_ERROR CommissioneeDeviceProxy::SetConnected()
{
return CHIP_ERROR_INCORRECT_STATE;
}
mState = ConnectionState::SecureConnected;
bool _didLoad;
CHIP_ERROR err = LoadSecureSessionParametersIfNeeded(_didLoad);
if (err == CHIP_NO_ERROR)
if (err != CHIP_NO_ERROR)
{
mState = ConnectionState::SecureConnected;
mState = ConnectionState::NotConnected;
}
return err;
}
Expand Down

0 comments on commit 6e7ad99

Please sign in to comment.