Skip to content

Commit

Permalink
Only do address updates for CASE delivery failures. (project-chip#22327)
Browse files Browse the repository at this point in the history
* Only do address updates for CASE delivery failures.

When the handling of "failed to send message, so update the IP for this peer"
moved out of DeviceCommissioner, we stopped checking whether the session is a
CASE session.  Go back to checking that again.

Fixes project-chip#22326

* Address review comment.
  • Loading branch information
bzbarsky-apple authored and isiu-apple committed Sep 16, 2022
1 parent 35c078c commit 30a0578
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/messaging/ReliableMessageMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ CHIP_ERROR ReliableMessageMgr::SendFromRetransTable(RetransTableEntry * entry)
if (exchangeMgr)
{
// After the first failure notify session manager to refresh device data
if (entry->sendCount == 1 && mSessionUpdateDelegate != nullptr)
if (entry->sendCount == 1 && mSessionUpdateDelegate != nullptr && entry->ec->GetSessionHandle()->IsSecureSession() &&
entry->ec->GetSessionHandle()->AsSecureSession()->IsCASESession())
{
ChipLogDetail(ExchangeManager, "Notify session manager to update peer address");
mSessionUpdateDelegate->UpdatePeerAddress(entry->ec->GetSessionHandle()->GetPeer());
Expand Down

0 comments on commit 30a0578

Please sign in to comment.