Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EFR32 OTA] Invoke Silabs API for writing, verifying and applying the image #13499

Merged
merged 13 commits into from
Jan 13, 2022
Merged
Prev Previous commit
Next Next commit
Close exchange when session is released (#13448)
* Close exchange when session is released

* Add clearRetransTable parameter to DoClose call

Co-authored-by: Andrei Litvin <andy314@gmail.com>
  • Loading branch information
2 people authored and selissia committed Jan 13, 2022
commit b3c09d8b2deeba1bdd7f590d17f367709a1e8288
17 changes: 9 additions & 8 deletions src/messaging/ExchangeContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,18 @@ bool ExchangeContext::MatchExchange(const SessionHandle & session, const PacketH

void ExchangeContext::OnSessionReleased()
{
if (!IsResponseExpected())
ExchangeHandle ref(*this);

if (IsResponseExpected())
{
// Nothing to do in this case
return;
// If we're waiting on a response, we now know it's never going to show up
// and we should notify our delegate accordingly.
CancelResponseTimer();
SetResponseExpected(false);
NotifyResponseTimeout();
}

// If we're waiting on a response, we now know it's never going to show up
// and we should notify our delegate accordingly.
CancelResponseTimer();
SetResponseExpected(false);
NotifyResponseTimeout();
DoClose(true /* clearRetransTable */);
}

CHIP_ERROR ExchangeContext::StartResponseTimer()
Expand Down