mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-10-22 14:01:24 +00:00
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:
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user