We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f888f8 commit e1a8fb5Copy full SHA for e1a8fb5
features/FEATURE_BLE/source/generic/GenericGap.cpp
@@ -1482,16 +1482,16 @@ BLE_DEPRECATED_API_USE_END()
1482
1483
void GenericGap::on_scan_timeout()
1484
{
1485
+ if (!_scan_enabled) {
1486
+ return;
1487
+ }
1488
+
1489
/* if timeout happened on a 4.2 chip we need to stop the scan manually */
1490
if (is_extended_advertising_available()) {
1491
_pal_gap.scan_enable(false, false);
1492
set_random_address_rotation(false);
1493
}
1494
- if (!_scan_enabled) {
- return;
- }
-
1495
_scan_enabled = false;
1496
1497
if (!_eventHandler) {
0 commit comments