Skip to content

Commit

Permalink
Fix exchange delegate for post-subscription (#15339)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google authored Feb 18, 2022
1 parent a8ab030 commit 288007d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/ReadClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ CHIP_ERROR ReadClient::OnUnsolicitedReportData(Messaging::ExchangeContext * apEx
{
mpExchangeCtx = apExchangeContext;

//
// Let's take over further message processing on this exchange from the IM.
// This is only relevant for reports during post-subscription.
//
mpExchangeCtx->SetDelegate(this);

CHIP_ERROR err = ProcessReportData(std::move(aPayload));
if (err != CHIP_NO_ERROR)
{
Expand Down

0 comments on commit 288007d

Please sign in to comment.