From b11033bb8e267a84e77e2ca1513335ff8006c128 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 16 Nov 2017 11:40:21 -0800 Subject: [PATCH] Fix error reporting success status with longer payloads --- src/PubSubClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PubSubClient.cpp b/src/PubSubClient.cpp index 5932bdbe..7be46fa6 100755 --- a/src/PubSubClient.cpp +++ b/src/PubSubClient.cpp @@ -418,7 +418,7 @@ boolean PubSubClient::publish_P(const char* topic, const uint8_t* payload, unsig lastOutActivity = millis(); - return rc == tlen + 4 + plength; + return rc == tlen + 3 + llen + plength; } boolean PubSubClient::write(uint8_t header, uint8_t* buf, uint16_t length) {