Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FabricSync] Changed SDK TODO comment to spec TODO comment #35622

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions examples/fabric-admin/rpc/RpcServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate
public:
void OnCheckInCompleted(const chip::app::ICDClientInfo & clientInfo) override
{
// Needs for accessing mPendingCheckIn
// Accessing mPendingCheckIn should only be done while holding ChipStackLock
assertChipStackLockedByCurrentThread();
NodeId nodeId = clientInfo.peer_node.GetNodeId();
auto it = mPendingCheckIn.find(nodeId);
Expand All @@ -68,9 +68,12 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate
return;
}

// TODO(#33221): If there is a failure in sending the message this request just gets dropped.
// Work to see if there should be update to spec on whether some sort of failure later on
// Should be indicated in some manner, or identify a better recovery mechanism here.
// TODO https://github.com/CHIP-Specifications/connectedhomeip-spec/issues/10448. Spec does
// not define what to do if we fail to send the StayActiveRequest. We are assuming that any
// further attempts to send a StayActiveRequest will result in a similar failure. Because
// there is no mechanism for us to communicate with the client that sent out the KeepActive
// command that there was a failure, we simply fail silently. After spec issue is
// addressed, we can implement what spec defines here.
auto onDone = [=](uint32_t promisedActiveDuration) { ActiveChanged(nodeId, promisedActiveDuration); };
CHIP_ERROR err = StayActiveSender::SendStayActiveCommand(checkInData.mStayActiveDurationMs, clientInfo.peer_node,
chip::app::InteractionModelEngine::GetInstance(), onDone);
Expand Down Expand Up @@ -160,7 +163,7 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate

void ScheduleSendingKeepActiveOnCheckIn(NodeId nodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs)
{
// Needs for accessing mPendingCheckIn
// Accessing mPendingCheckIn should only be done while holding ChipStackLock
assertChipStackLockedByCurrentThread();

auto timeNow = System::SystemClock().GetMonotonicTimestamp();
Expand Down
Loading