Skip to content

Commit

Permalink
Checking mFinishedCommandCount doesn't require mpPendingResponseTrack…
Browse files Browse the repository at this point in the history
…er (#32375)
  • Loading branch information
tehampson authored and pull[bot] committed May 29, 2024
1 parent 565a969 commit 1526232
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/app/CommandSender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,7 @@ CHIP_ERROR CommandSender::PrepareCommand(const CommandPathParams & aCommandPathP
bool canAddAnotherCommand = (mState == State::AddedCommand && mBatchCommandsEnabled && mUseExtendableCallback);
VerifyOrReturnError(mState == State::Idle || canAddAnotherCommand, CHIP_ERROR_INCORRECT_STATE);

if (mpPendingResponseTracker != nullptr)
{
VerifyOrReturnError(mFinishedCommandCount < mRemoteMaxPathsPerInvoke, CHIP_ERROR_MAXIMUM_PATHS_PER_INVOKE_EXCEEDED);
}
VerifyOrReturnError(mFinishedCommandCount < mRemoteMaxPathsPerInvoke, CHIP_ERROR_MAXIMUM_PATHS_PER_INVOKE_EXCEEDED);

if (mBatchCommandsEnabled)
{
Expand Down

0 comments on commit 1526232

Please sign in to comment.