Force `MQTT_MAX_PACKET_SIZE` in PubSub client

This commit is contained in:
Stephan Hadinger 2022-01-03 19:03:00 +01:00
parent 3916709d5f
commit f2d8563597
1 changed files with 3 additions and 0 deletions

View File

@ -188,6 +188,9 @@ void MqttDisableLogging(bool state) {
PubSubClient MqttClient;
void MqttInit(void) {
// Force buffer size since the #define may not be visible from Arduino lib
MqttClient.setBufferSize(MQTT_MAX_PACKET_SIZE);
#ifdef USE_MQTT_AZURE_IOT
Settings->mqtt_port = 8883;
#endif //USE_MQTT_AZURE_IOT