@@ -47,7 +47,7 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate
47
47
public:
48
48
void OnCheckInCompleted (const chip::app::ICDClientInfo & clientInfo) override
49
49
{
50
- // Needs for accessing mPendingCheckIn
50
+ // Accessing mPendingCheckIn should only be done while holding ChipStackLock
51
51
assertChipStackLockedByCurrentThread ();
52
52
NodeId nodeId = clientInfo.peer_node .GetNodeId ();
53
53
auto it = mPendingCheckIn .find (nodeId);
@@ -68,9 +68,12 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate
68
68
return ;
69
69
}
70
70
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.
74
77
auto onDone = [=](uint32_t promisedActiveDuration) { ActiveChanged (nodeId, promisedActiveDuration); };
75
78
CHIP_ERROR err = StayActiveSender::SendStayActiveCommand (checkInData.mStayActiveDurationMs , clientInfo.peer_node ,
76
79
chip::app::InteractionModelEngine::GetInstance (), onDone);
@@ -160,7 +163,7 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate
160
163
161
164
void ScheduleSendingKeepActiveOnCheckIn (NodeId nodeId, uint32_t stayActiveDurationMs, uint32_t timeoutMs)
162
165
{
163
- // Needs for accessing mPendingCheckIn
166
+ // Accessing mPendingCheckIn should only be done while holding ChipStackLock
164
167
assertChipStackLockedByCurrentThread ();
165
168
166
169
auto timeNow = System::SystemClock ().GetMonotonicTimestamp ();
0 commit comments