Don't use assert() with side effects in a couple more places (#7009)

* Don't use assert for Lock

* Don't use assert for MQTT messages

* Split assert in getMacAddr to always run the function

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Chloe Bethel
2025-06-12 19:55:35 -05:00
committed by GitHub
co-authored by GitHub Ben Meadors
parent a1a5503fe9
commit 4e6418b635
3 changed files with 17 additions and 6 deletions
+4 -1
View File
@@ -763,7 +763,10 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp_encrypted, const meshtastic_Me
}
entry->topic = std::move(topic);
entry->envBytes.assign(bytes, numBytes);
assert(mqttQueue.enqueue(entry, 0));
if (mqttQueue.enqueue(entry, 0) == false) {
LOG_CRIT("Failed to add a message to mqttQueue!");
abort();
}
}
}