Skip to content

Commit

Permalink
[chip-tool] When sending a command fails for some reasons, chip-tool …
Browse files Browse the repository at this point in the history
…ignore the error (#13690)
  • Loading branch information
vivien-apple authored Jan 20, 2022
1 parent 6dbf79d commit b700fb8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/chip-tool/commands/clusters/ModelCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ void ModelCommand::OnDeviceConnectedFn(void * context, ChipDevice * device)
{
ModelCommand * command = reinterpret_cast<ModelCommand *>(context);
VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "OnDeviceConnectedFn: context is null"));
command->SendCommand(device, command->mEndPointId);

CHIP_ERROR err = command->SendCommand(device, command->mEndPointId);
VerifyOrReturn(CHIP_NO_ERROR == err, command->SetCommandExitStatus(err));
}

void ModelCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err)
Expand Down

0 comments on commit b700fb8

Please sign in to comment.