Skip to content

Commit 0d665d7

Browse files
authored
fix: restoring handshake timeout (#6165) (#6166)
1 parent bb7df04 commit 0d665d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: libraries/WiFiClientSecure/src/ssl_client.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,13 @@ void stop_ssl_socket(sslclient_context *ssl_client, const char *rootCABuff, cons
335335
mbedtls_ssl_config_free(&ssl_client->ssl_conf);
336336
mbedtls_ctr_drbg_free(&ssl_client->drbg_ctx);
337337
mbedtls_entropy_free(&ssl_client->entropy_ctx);
338+
339+
// save only interesting field
340+
int timeout = ssl_client->handshake_timeout;
338341
// reset embedded pointers to zero
339342
memset(ssl_client, 0, sizeof(sslclient_context));
343+
344+
ssl_client->handshake_timeout = timeout;
340345
}
341346

342347

0 commit comments

Comments
 (0)