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 Apr 24, 2024
1 parent 4a2cd8d commit d4e4bbb
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 d4e4bbb

Please sign in to comment.