response error messages

This commit is contained in:
MichaelDvP
2023-07-29 16:39:37 +02:00
parent bb39e8bd4c
commit 52de833b19
2 changed files with 8 additions and 3 deletions

View File

@@ -250,9 +250,7 @@ void Mqtt::on_message(const char * topic, const uint8_t * payload, size_t len) c
if ((!strcmp(topic, full_topic)) && (mf.mqtt_subfunction_)) {
if (!(mf.mqtt_subfunction_)(message)) {
LOG_ERROR("error: invalid payload %s for this topic %s", message, topic);
if (send_response_) {
Mqtt::queue_publish("response", "error: invalid data");
}
Mqtt::queue_publish("response", "error: invalid data");
}
return;
}