diff --git a/library/ssl_tls.c b/library/ssl_tls.c index f0da0ddce7..776b8da337 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -4465,8 +4465,8 @@ void mbedtls_ssl_handshake_free(mbedtls_ssl_context *ssl) #if defined(MBEDTLS_SSL_ASYNC_PRIVATE) if (ssl->conf != NULL) { if (ssl->conf->f_async_cancel != NULL && handshake->async_in_progress != 0) { - ssl->conf->f_async_cancel(ssl); - handshake->async_in_progress = 0; + ssl->conf->f_async_cancel(ssl); + handshake->async_in_progress = 0; } }