diff --git a/connectivity/FEATURE_BLE/source/cordio/source/PalGapImpl.cpp b/connectivity/FEATURE_BLE/source/cordio/source/PalGapImpl.cpp index 644c76e8ad..80bdea8ae1 100644 --- a/connectivity/FEATURE_BLE/source/cordio/source/PalGapImpl.cpp +++ b/connectivity/FEATURE_BLE/source/cordio/source/PalGapImpl.cpp @@ -701,7 +701,10 @@ void PalGap::gap_handler(const wsfMsgHdr_t *msg) break; case DM_EXT_SCAN_STOP_IND: { - if (!handler) { break; } + if (!handler) { + get_gap().ext_scan_stopping = false; + break; + } if (get_gap().ext_scan_stopping) { get_gap().ext_scan_stopping = false;