mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
When WiFiClientSecure::connect was called, it would first tear down and existing and set up new TCP session, then tear down existing TLS session (using ssl_free), and then set up a new one. This caused TLS close- notify alert to be sent to the new TCP session, preventing new session from being established. This change postpones setting IO ctx to the new TCP connection, fixing this issue. Ref https://github.com/esp8266/Arduino/issues/3330