From 4188bbd3d3fb52518994a5570fc10fe7549071ad Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Fri, 29 Apr 2022 20:24:19 +1000 Subject: [PATCH] extmod/modussl_mbedtls: Poll EVENT_POLL_HOOK in ssl handshake loop. Otherwise this is essentially an infinite loop on ports that do not use interrupts to service network interfaces. Signed-off-by: Andrew Leech --- extmod/modussl_mbedtls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extmod/modussl_mbedtls.c b/extmod/modussl_mbedtls.c index 0d5d4197cc..44668ae63b 100644 --- a/extmod/modussl_mbedtls.c +++ b/extmod/modussl_mbedtls.c @@ -242,6 +242,9 @@ STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) { if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { goto cleanup; } + #ifdef MICROPY_EVENT_POLL_HOOK + MICROPY_EVENT_POLL_HOOK + #endif } }