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>
pull/8724/head
Andrew Leech 2022-04-29 20:24:19 +10:00 zatwierdzone przez Damien George
rodzic ffe5f2efe2
commit 4188bbd3d3
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

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