Fix assert on SystemLayer().StartTimer call by aquiring the chipStack Lock before the call (#26200)
diff --git a/src/platform/Linux/BLEManagerImpl.cpp b/src/platform/Linux/BLEManagerImpl.cpp
index c9ae6ae..2cc5c6a 100644
--- a/src/platform/Linux/BLEManagerImpl.cpp
+++ b/src/platform/Linux/BLEManagerImpl.cpp
@@ -796,7 +796,11 @@
}
mBLEScanConfig.mBleScanState = BleScanState::kConnecting;
+
+ chip::DeviceLayer::PlatformMgr().LockChipStack();
DeviceLayer::SystemLayer().StartTimer(kConnectTimeout, HandleConnectTimeout, mpEndpoint);
+ chip::DeviceLayer::PlatformMgr().UnlockChipStack();
+
mDeviceScanner->StopScan();
ConnectDevice(device, mpEndpoint);