We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0be8943 commit f65b157Copy full SHA for f65b157
libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp
@@ -250,7 +250,11 @@ void WiFiClientSecureCtx::_freeSSL() {
250
}
251
252
bool WiFiClientSecureCtx::_clientConnected() {
253
- return _client && (_client->state() == ESTABLISHED);
+ if (!_client || (_client->state() == CLOSED)) {
254
+ return false;
255
+ }
256
+
257
+ return _client->state() == ESTABLISHED;
258
259
260
bool WiFiClientSecureCtx::_engineConnected() {
@@ -264,7 +268,7 @@ uint8_t WiFiClientSecureCtx::connected() {
264
268
265
269
_pollRecvBuffer();
266
270
267
- return _engineConnected();
271
+ return _engineConnected() || (available() > 0);
272
273
274
int WiFiClientSecureCtx::availableForWrite () {
0 commit comments