Skip to content

Commit

Permalink
Fixed a bug in ReadHandler's destructor that failed to deregister one of
Browse files Browse the repository at this point in the history
two timer callbacks, resulting in it firing after the object's
destruction and causing all kinds of memory corruption havoc that took 3
hours to debug.
  • Loading branch information
mrjerryjohns committed Jan 26, 2022
1 parent cdd5849 commit a35b0f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/ReadHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ ReadHandler::~ReadHandler()

if (IsType(InteractionType::Subscribe))
{
InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer(
OnUnblockHoldReportCallback, this);

InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->CancelTimer(
OnRefreshSubscribeTimerSyncCallback, this);
}
Expand Down

0 comments on commit a35b0f6

Please sign in to comment.