Skip to content

Commit fb44e02

Browse files
committed
fix standalone build
1 parent 81842e5 commit fb44e02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mqtt.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,8 @@ bool Mqtt::queue_message(const uint8_t operation, const std::string & topic, con
592592
if (!mqtt_enabled_ || topic.empty()) {
593593
return false; // quit, not using MQTT
594594
}
595-
// check free mem
595+
// check free mem
596+
#ifndef EMSESP_STANDALONE
596597
if (ESP.getFreeHeap() < 60 * 1204) {
597598
if (operation == Operation::PUBLISH) {
598599
mqtt_message_id_++;
@@ -601,6 +602,7 @@ bool Mqtt::queue_message(const uint8_t operation, const std::string & topic, con
601602
LOG_DEBUG("%s failed: low memory", operation == Operation::PUBLISH ? "Publish" : operation == Operation::SUBSCRIBE ? "Subscribe" : "Unsubscribe");
602603
return false; // quit
603604
}
605+
#endif
604606

605607
uint16_t packet_id = 0;
606608
char fulltopic[MQTT_TOPIC_MAX_SIZE];

0 commit comments

Comments
 (0)