Fix calling scan ended callback when scan was already stopped.

This commit is contained in:
h2zero 2020-07-12 20:35:10 -06:00
parent c03053fb53
commit 5857879612

View file

@ -343,7 +343,7 @@ bool NimBLEScan::stop() {
m_stopped = true;
if (m_scanCompleteCB != nullptr) {
if (rc != BLE_HS_EALREADY && m_scanCompleteCB != nullptr) {
m_scanCompleteCB(m_scanResults);
}