Skip to content

Commit dee20fe

Browse files
committed
BLE: Check if extended advertising is available to clear advertising set upon connection
1 parent f126793 commit dee20fe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

connectivity/FEATURE_BLE/source/generic/GapImpl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,9 +1295,7 @@ void Gap::on_connection_complete(const GapConnectionCompleteEvent &e)
12951295
return;
12961296
}
12971297

1298-
// There is no need to check for extending advertising availability as this
1299-
// handler is for 4.x controllers
1300-
if (e.role == connection_role_t::PERIPHERAL) {
1298+
if (!is_extended_advertising_available() && e.role == connection_role_t::PERIPHERAL) {
13011299
_active_sets.clear(LEGACY_ADVERTISING_HANDLE);
13021300
}
13031301

0 commit comments

Comments
 (0)