Skip to content

Commit 3d15743

Browse files
committed
WiFiSSLClient: specialize stop()
1 parent 7da7e22 commit 3d15743

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

libraries/WiFi/src/WiFiClient.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ void arduino::WiFiClient::flush() {
127127
void arduino::WiFiClient::stop() {
128128
if (sock != NULL) {
129129
sock->close();
130-
//delete[] sock;
131130
sock = NULL;
132131
}
133132
}

libraries/WiFi/src/WiFiSSLClient.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ class WiFiSSLClient : public arduino::WiFiClient {
3737
int connect(const char* host, uint16_t port) {
3838
return connectSSL(host, port);
3939
}
40+
void stop() {
41+
if (sock != NULL) {
42+
sock->close();
43+
delete ((TLSSocket*)sock);
44+
sock = NULL;
45+
}
46+
}
4047

4148
private:
4249
int setRootCA() {

0 commit comments

Comments
 (0)