TLS ESP32, if max packet size is more than 2000, extend TLS buffers to 4K

This commit is contained in:
Stephan Hadinger 2022-01-08 18:10:17 +01:00
parent 9a9d869676
commit 3c3ccfa660
1 changed files with 4 additions and 0 deletions

View File

@ -211,7 +211,11 @@ void MqttInit(void) {
if (Mqtt.mqtt_tls) {
#ifdef ESP32
#if MQTT_MAX_PACKET_SIZE > 2000
tlsClient = new BearSSL::WiFiClientSecure_light(4096,4096);
#else
tlsClient = new BearSSL::WiFiClientSecure_light(2048,2048);
#endif
#else // ESP32 - ESP8266
tlsClient = new BearSSL::WiFiClientSecure_light(1024,1024);
#endif