Skip to content

Commit f24a111

Browse files
authored
Fix calling scan ended callback when scan was already stopped. (#82)
1 parent 33a0660 commit f24a111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NimBLEScan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ bool NimBLEScan::stop() {
343343

344344
m_stopped = true;
345345

346-
if (m_scanCompleteCB != nullptr) {
346+
if (rc != BLE_HS_EALREADY && m_scanCompleteCB != nullptr) {
347347
m_scanCompleteCB(m_scanResults);
348348
}
349349

0 commit comments

Comments
 (0)