Skip to content

Commit

Permalink
Update src/protocols/secure_channel/CASEServer.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Lepage <[email protected]>
  • Loading branch information
shubhamdp and mlepage-google committed Jun 29, 2023
1 parent af2d3c9 commit 3fe5e8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/protocols/secure_channel/CASEServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ CHIP_ERROR CASEServer::OnMessageReceived(Messaging::ExchangeContext * ec, const
{
// We are in the middle of CASE handshake

// Check if we are stuck on background thread, if yes, unblock it, and continue
if (GetSession().InvokeBackgroundWorkWatchdog() == false)
// Invoke watchdog to fix any stuck handshakes
bool watchdogFired = GetSession().InvokeBackgroundWorkWatchdog();
if (!watchdogFired)
{
// Handshake wasn't stuck, let it continue its work
// TODO: Send Busy response, #27473
ChipLogError(Inet, "CASE session is in establishing state, returning without responding");
return CHIP_NO_ERROR;
Expand Down

0 comments on commit 3fe5e8d

Please sign in to comment.