Add ble_hs_synced() guard to notifyAll()

Matches the guard already on notify() to prevent use-after-free
of _tx_char during a NimBLE host reset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
torlando-techandClaude Opus 4.6 committed 2026-03-04 16:20:06 -05:00
1 parent 4ba97057c5
commit ed8c08109f
1 file changed
+1 -1
@@ -1817,7 +1817,7 @@ bool NimBLEPlatform::notify(uint16_t conn_handle, const Bytes& data) {
}
bool NimBLEPlatform::notifyAll(const Bytes& data) {
if (!_tx_char) {
if (!ble_hs_synced() || !_tx_char) {
return false;
}