Skip to content

Commit

Permalink
mqtt memcheck to 40k
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Sep 8, 2024
1 parent 1be2eea commit fdda94a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,8 @@ bool Mqtt::queue_message(const uint8_t operation, const std::string & topic, con
// check free mem
#ifndef EMSESP_STANDALONE
// if (ESP.getFreeHeap() < 60 * 1024 || ESP.getMaxAllocHeap() < 40 * 1024) {
if (heap_caps_get_free_size(MALLOC_CAP_8BIT) < 50 * 1024) { // checks free Heap+PSRAM
// if (!EMSESP::system_.PSram() && (ESP.getFreeHeap() < 60 * 1024 || ESP.getMaxAllocHeap() < 40 * 1024)) {
if (heap_caps_get_free_size(MALLOC_CAP_8BIT) < 40 * 1024) { // checks free Heap+PSRAM
if (operation == Operation::PUBLISH) {
mqtt_message_id_++;
mqtt_publish_fails_++;
Expand Down

0 comments on commit fdda94a

Please sign in to comment.