Skip to content

V2.4.0RC1 Memory Leak using WiFiClientSecure on closing connection #3619

Closed
@mars000

Description

@mars000

Hi

After many many hours of problem solvingI have verified the same code running on V2.3.0 and also V2.4.0RC1. Is this a known issue ?
I have found it runs for days and days with no issues on V2.3.0 irrespective, if I keep connection open or if I close it.
But on V2.4.0RC1 it crashes after an hour if I choose to close the connection. Specifically, I have found that in situations where I close WiFiClientSecure connection and later re-open with a

client.connect()

command, it fails to recover all memory. However, on V2.4.0RC1 if always leave the connection open as per the first piece of code below then it works on V2.4.0RC1.

Specifically:
The below code leaves connection open and this seems to work for both V2.3.0 and V2.4.0RC1.

  client->print(String("GET ") + url + " HTTP/1.1\r\n" +
                 "Host: " + blynk_server + "\r\n" +
                 "User-Agent: BuildFailureDetectorESP8266\r\n" +
                 "Connection: open\r\n\r\n"); // leave connection open

However when closing the connect with below code causes memory leak on V2.4.0RC1.

  client->print(String("GET ") + url + " HTTP/1.1\r\n" +
                 "Host: " + blynk_server + "\r\n" +
                 "User-Agent: BuildFailureDetectorESP8266\r\n" +
                 "Connection: close\r\n\r\n"); // close connection

Basic Infos

Hardware

Hardware: ESP-12E (Wemos Mini Pro)
Core Version: 2.4.0-rc1

Description

Problem description

Settings in IDE

Module: Wemos Mini Pro
Flash Size: ?4MB/1MB?
CPU Frequency: ?80Mhz?
Flash Mode: ?qio?
Flash Frequency: ?40Mhz?
Upload Using: ?OTA / SERIAL?
Reset Method: ?ck / nodemcu?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions