Apply advertising requests once BLE becomes active

A component that requests advertising during setup does so before the stack is
up, so the request had no effect until something else restarted advertising.
Refresh on the transition to active so early requests, and requests still held
across a disable/enable cycle, take effect right away.
This commit is contained in:
Jesse Hills
2026-09-03 07:28:23 +12:00
parent 3fa9cd5abf
commit 47aaa21f8d
+4
View File
@@ -592,6 +592,10 @@ void ESP32BLE::loop_handle_state_transition_not_active_() {
}
this->state_ = BLE_COMPONENT_STATE_ACTIVE;
#ifdef USE_ESP32_BLE_ADVERTISING
// Requests made before the stack was up (or before it was re-enabled) take effect now
this->advertising_refresh();
#endif
}
}