Increase the usleep argument 31/307331/1
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 7 Mar 2024 08:34:33 +0000 (09:34 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 7 Mar 2024 08:34:33 +0000 (09:34 +0100)
This fixes the following SVACE defect:
For better performance VD recommends NOT to use less than 10'000us.

Change-Id: Ibdc6235b58919caf12ba36642ebcce207e7f0a3a

srcs/bluetooth_advert.cpp

index 4e5a2d86e30e4d0494f481d83b7612a6e82bbe4c..fd789cee68fbd7562a66989a69aae0c64ea72559 100644 (file)
@@ -134,7 +134,7 @@ int Bluetooth::StartLEAdvertScanAndAwaitStop(CallbackType callback, void *userDa
     m_scanCallback = callback;
     m_scanCallbackUserData = userData;
     // Starting scan can fail for some time just after enabling the adapter, so retry it for 1s
-    constexpr auto SLEEP_PERIOD_US = 1000;
+    constexpr auto SLEEP_PERIOD_US = 10'000;
     for (int i = 0; i < 1'000'000 / SLEEP_PERIOD_US; ++i) {
         err = bt_adapter_le_start_scan(ScanCallback, this);
         if (err == BT_ERROR_OPERATION_FAILED) {