Skip to content

Commit 93601da

Browse files
committed
[N001] And clean up object after use
1 parent db9a08c commit 93601da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/src/NotifierStructs/N001_data_struct.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ bool NPlugin_001_send(const NotificationSettingsStruct& notificationsettings, St
3333

3434
BearSSL::WiFiClientSecure_light secureClient(4096, 4096);
3535

36-
if ((notificationsettings.Port != 25) && (notificationsettings.Port != 2525)) { // Port 25 or 2525 is a standard WiFiClient, all else is a secure client...
36+
// Port 25 or 2525 is a standard WiFiClient, all else is a secure client...
37+
if ((notificationsettings.Port != 25) && (notificationsettings.Port != 2525)) {
3738
secureClient.setUtcTime_fcn(getUnixTime);
3839
secureClient.setCfgTime_fcn(get_build_unixtime);
3940
secureClient.setTrustAnchor(Tasmota_TA, Tasmota_TA_size);
@@ -356,6 +357,7 @@ bool NPlugin_001_send(const NotificationSettingsStruct& notificationsettings, St
356357

357358
// client.PR_9453_FLUSH_TO_CLEAR();
358359
client->stop();
360+
delete client;
359361

360362
if (myStatus == true) {
361363
addLog(LOG_LEVEL_INFO, F("Email: Connection Closed Successfully"));

0 commit comments

Comments
 (0)