Skip to content

Commit

Permalink
Moved status check before setting atomic variable
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamdp committed Jun 29, 2023
1 parent 3fe5e8d commit 820b8a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocols/secure_channel/CASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ class CASESession::WorkHelper
{
// We failed to schedule after work callback, so setting mScheduleAfterWorkFailed flag to true
// This can be checked from foreground thread and after work callback can be retried
helper->mStatus = status;
ChipLogError(SecureChannel, "Failed to Schedule the AfterWorkCallback on foreground thread");
helper->mScheduleAfterWorkFailed.store(true);
helper->mStatus = status;

// Release strong ptr since scheduling failed
helper->mStrongPtr.reset();
Expand Down

0 comments on commit 820b8a4

Please sign in to comment.