From 4338266152efd0fe2d5c4d57c90391f811edff6e Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 16 May 2023 11:57:03 -0400 Subject: [PATCH] Remove acquiring matter context lock for canceling TimerExpiredCallback (#26578) * Remove acquiring matter context lock for canceling TimerExpiredCallback * Update comment to reflect update to code --- src/platform/Linux/bluez/ChipDeviceScanner.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/platform/Linux/bluez/ChipDeviceScanner.cpp b/src/platform/Linux/bluez/ChipDeviceScanner.cpp index 344eedcce1a191..583a426a6a6d97 100644 --- a/src/platform/Linux/bluez/ChipDeviceScanner.cpp +++ b/src/platform/Linux/bluez/ChipDeviceScanner.cpp @@ -105,14 +105,10 @@ ChipDeviceScanner::~ChipDeviceScanner() StopScan(); // mTimerExpired should only be set to true in the TimerExpiredCallback, which means we are in that callback - // right now so there is no need to cancel the timer. Doing so would result in deadlock trying to aquire the - // chip stack lock which we already currently have. + // right now so there is no need to cancel the timer. if (!mTimerExpired) { - // In case the timeout timer is still active - DeviceLayer::PlatformMgr().LockChipStack(); chip::DeviceLayer::SystemLayer().CancelTimer(TimerExpiredCallback, this); - DeviceLayer::PlatformMgr().UnlockChipStack(); } g_object_unref(mManager);