Skip MQTT allocation when disabled (#10411)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
co-authored by
GitHub
Ben Meadors
parent
784e3748e2
commit
4553d1e0b1
@@ -409,6 +409,9 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length)
|
||||
|
||||
void mqttInit()
|
||||
{
|
||||
if (!moduleConfig.mqtt.enabled)
|
||||
return;
|
||||
|
||||
new MQTT();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user