1
0
mirror of https://github.com/adafruit/Adafruit_MQTT_Library.git synced 2025-06-13 10:01:31 +03:00

max receivable MQTT packet is 16 bits (tested with 300 byte packet receive)

also fixd buffer printer to have 16 bit length
This commit is contained in:
ladyada
2016-07-06 17:20:02 -04:00
parent 121aa3865c
commit b26b4eb32c
6 changed files with 22 additions and 17 deletions

View File

@ -47,7 +47,7 @@ bool Adafruit_MQTT_Client::connected() {
return client->connected();
}
uint16_t Adafruit_MQTT_Client::readPacket(uint8_t *buffer, uint8_t maxlen,
uint16_t Adafruit_MQTT_Client::readPacket(uint8_t *buffer, uint16_t maxlen,
int16_t timeout) {
/* Read data until either the connection is closed, or the idle timeout is reached. */
uint16_t len = 0;