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>
This commit is contained in:
Andrew Leech 2022-04-29 20:24:19 +10:00 committed by Damien George
parent ffe5f2efe2
commit 4188bbd3d3
1 changed files with 3 additions and 0 deletions

View File

@ -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
}
}