close underlying socket object when closing ssl socket

This commit is contained in:
Jeff Epler 2022-10-05 15:10:14 -05:00
parent 4a9389d347
commit 2dc283f578
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 1 additions and 0 deletions

View File

@ -267,6 +267,7 @@ bool common_hal_ssl_sslsocket_bind(ssl_sslsocket_obj_t *self, const char *host,
void common_hal_ssl_sslsocket_close(ssl_sslsocket_obj_t *self) { void common_hal_ssl_sslsocket_close(ssl_sslsocket_obj_t *self) {
self->closed = true; self->closed = true;
common_hal_socketpool_socket_close(self->sock);
mbedtls_pk_free(&self->pkey); mbedtls_pk_free(&self->pkey);
mbedtls_x509_crt_free(&self->cert); mbedtls_x509_crt_free(&self->cert);
mbedtls_x509_crt_free(&self->cacert); mbedtls_x509_crt_free(&self->cacert);