mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-10 18:24:27 +05:00
fix: write empty topics (mqtt)
This commit is contained in:
@@ -128,7 +128,7 @@ public:
|
|||||||
size_t written = 0;
|
size_t written = 0;
|
||||||
bool result = false;
|
bool result = false;
|
||||||
if (!length || buffer == nullptr) {
|
if (!length || buffer == nullptr) {
|
||||||
result = this->client->beginMessage(topic, 0, retained) && this->client->endMessage();
|
result = this->client->beginMessage(topic, retained) && this->client->endMessage();
|
||||||
|
|
||||||
} else if (this->client->beginMessage(topic, length, retained)) {
|
} else if (this->client->beginMessage(topic, length, retained)) {
|
||||||
this->write(buffer, length);
|
this->write(buffer, length);
|
||||||
|
|||||||
Reference in New Issue
Block a user