Skip to content

Commit a8a4741

Browse files
adding rx_buffer clear on stop call
1 parent 4b6c189 commit a8a4741

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: libraries/WiFiS3/src/WiFiClient.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ void WiFiClient::stop() {
210210
modem.write(string(PROMPT(_CLIENTCLOSE)),res, "%s%d\r\n" , CMD_WRITE(_CLIENTCLOSE), _sock);
211211
_sock = -1;
212212
}
213+
214+
rx_buffer->clear();
213215
}
214216

215217
/* -------------------------------------------------------------------------- */

Diff for: libraries/WiFiS3/src/WiFiSSLClient.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ void WiFiSSLClient::stop() {
227227
modem.write(string(PROMPT(_SSLCLIENTCLOSE)),res, "%s%d\r\n" , CMD_WRITE(_SSLCLIENTCLOSE), _sock);
228228
_sock = -1;
229229
}
230+
231+
rx_buffer->clear();
230232
}
231233

232234
/* -------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)