aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Leech <andrew@alelec.net>2022-04-29 20:24:19 +1000
committerDamien George <damien@micropython.org>2022-06-03 14:34:29 +1000
commit4188bbd3d3fb52518994a5570fc10fe7549071ad (patch)
treedab58efda118f1527108cf65926111c524f037e1
parentffe5f2efe22562736428ccbd1b91943b18422527 (diff)
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 <andrew@alelec.net>
-rw-r--r--extmod/modussl_mbedtls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/extmod/modussl_mbedtls.c b/extmod/modussl_mbedtls.c
index 0d5d4197c..44668ae63 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
}
}