Skip to content

Commit 2106492

Browse files
authored
[FabricSync] Changed SDK TODO comment to spec TODO comment (#35622)
1 parent ead3862 commit 2106492

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

examples/fabric-admin/rpc/RpcServer.cpp

+8-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate
4747
public:
4848
void OnCheckInCompleted(const chip::app::ICDClientInfo & clientInfo) override
4949
{
50-
// Needs for accessing mPendingCheckIn
50+
// Accessing mPendingCheckIn should only be done while holding ChipStackLock
5151
assertChipStackLockedByCurrentThread();
5252
NodeId nodeId = clientInfo.peer_node.GetNodeId();
5353
auto it = mPendingCheckIn.find(nodeId);
@@ -68,9 +68,12 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate
6868
return;
6969
}
7070

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

161164
void ScheduleSendingKeepActiveOnCheckIn(NodeId nodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs)
162165
{
163-
// Needs for accessing mPendingCheckIn
166+
// Accessing mPendingCheckIn should only be done while holding ChipStackLock
164167
assertChipStackLockedByCurrentThread();
165168

166169
auto timeNow = System::SystemClock().GetMonotonicTimestamp();

0 commit comments

Comments
 (0)