Automatically add new line char in MQTT frames

This commit is contained in:
Alex Spataru 2021-03-08 17:32:06 -05:00
parent 4de0d2f9a4
commit dd7f2e593e

View File

@ -547,6 +547,10 @@ void Client::onMessageReceived(const QMQTT::Message &message)
if (topic() != mtopic)
return;
// Let IO manager process incoming data <todo>
// Add EOL character
if (!mpayld.endsWith('\n'))
mpayld.append('\n');
// Let IO manager process incoming data
IO::Manager::getInstance()->processPayload(mpayld);
}