Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Adafruit_MQTT_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,14 @@ bool Adafruit_MQTT_Client::sendPacket(uint8_t *buffer, uint16_t len) {

while (len > 0) {
if (client->connected()) {

// send 250 bytes at most at a time, can adjust this later based on Client
#ifdef ESP8266
uint16_t sendlen = len; //ESP8266's implementation can handle large packets by itself.
#else
uint16_t sendlen = len > 250 ? 250 : len;
#endif

uint16_t sendlen = len > 250 ? 250 : len;
//Serial.print("Sending: "); Serial.println(sendlen);
ret = client->write(buffer, sendlen);
DEBUG_PRINT(F("Client sendPacket returned: ")); DEBUG_PRINTLN(ret);
Expand Down