Skip to content

Commit

Permalink
Address review comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple committed Oct 9, 2023
1 parent 6ecfb46 commit d06fbf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/messaging/ExchangeContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ void ExchangeContext::NotifyResponseTimeout(bool aCloseIfNeeded)
#endif // CONFIG_DEVICE_LAYER && CHIP_CONFIG_ENABLE_ICD_SERVER

// Grab the value of WaitingForResponseOrAck() before we mess with our state.
bool mrpTimedOut = WaitingForResponseOrAck();
bool gotMRPAck = !WaitingForResponseOrAck();

SetResponseExpected(false);

Expand All @@ -506,8 +506,8 @@ void ExchangeContext::NotifyResponseTimeout(bool aCloseIfNeeded)
{
// If we timed out _after_ getting an ack for the message, that means
// the session is probably fine (since our message and the ack got
// through), so don't mark the session defunct unless MRP also timed out.
if (mrpTimedOut)
// through), so don't mark the session defunct if we got an MRP ack.
if (!gotMRPAck)
{
if (mSession->IsSecureSession() && mSession->AsSecureSession()->IsCASESession())
{
Expand Down

0 comments on commit d06fbf8

Please sign in to comment.