Merge pull request #14334 from s-hadinger/tls_4K_buffers

TLS ESP32, if max packet size is more than 2000, extend TLS buffers to 4K
This commit is contained in:
s-hadinger 2022-01-08 18:22:24 +01:00 committed by GitHub
commit cf1f7b135f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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