mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user