BLE: Check if extended advertising is available to clear advertising set upon connection

pull/13759/head
Vincent Coubard 2020-09-23 11:00:07 +01:00
parent f126793f20
commit dee20fe5a7
1 changed files with 1 additions and 3 deletions

View File

@ -1295,9 +1295,7 @@ void Gap::on_connection_complete(const GapConnectionCompleteEvent &e)
return;
}
// There is no need to check for extending advertising availability as this
// handler is for 4.x controllers
if (e.role == connection_role_t::PERIPHERAL) {
if (!is_extended_advertising_available() && e.role == connection_role_t::PERIPHERAL) {
_active_sets.clear(LEGACY_ADVERTISING_HANDLE);
}