Unverified Commit 5c224020 authored by Juraj Andrássy's avatar Juraj Andrássy Committed by GitHub

fix: ClientSecure.available() fix for connection closed by remote socket (#9869)

parent 1efab834
......@@ -305,9 +305,11 @@ int NetworkClientSecure::available() {
res = data_to_read(sslclient.get());
if (res < 0 && !_stillinPlainStart) {
if (res != MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) {
log_e("Closing connection on failed available check");
}
stop();
return peeked ? peeked : res;
return peeked;
}
return res + peeked;
}
......
......@@ -27,7 +27,7 @@
const char *pers = "esp32-tls";
static int _handle_error(int err, const char *function, int line) {
if (err == -30848) {
if (err == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) {
return err;
}
#ifdef MBEDTLS_ERROR_C
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment