Skip to content

Commit 46efe2c

Browse files
committed
Bugfix: Report not connected if there is no ready data and TLS connection is broken
1 parent ae812f2 commit 46efe2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ bool WiFiClientSecure::_clientConnected() {
255255
}
256256

257257
uint8_t WiFiClientSecure::connected() {
258-
if (available() || (_clientConnected() && _handshake_done)) {
258+
if (available() || (_clientConnected() && _handshake_done && (br_ssl_engine_current_state(_eng) != BR_SSL_CLOSED))) {
259259
return true;
260260
}
261261
return false;

0 commit comments

Comments
 (0)