diff options
| author | Damien George <damien@micropython.org> | 2025-07-23 14:44:11 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-07-31 10:46:47 +1000 |
| commit | 135c1cc7cd6077eda2dc860b3b7b51d742f6f630 (patch) | |
| tree | 57c18769e4d620f7dd9f8c91ab3d01f9d42a2c03 /py/objint.h | |
| parent | ab4af2c1a61550cd300ff8dcd57fce6099f3338e (diff) | |
extmod/modtls_mbedtls: Do gc_collect and retry ssl_init on any error.
Contrary to the docs, mbedtls can return more than just
MBEDTLS_ERR_SSL_ALLOC_FAILED when `mbedtls_ssl_setup()` fails. At least
MBEDTLS_ERR_MD_ALLOC_FAILED was also seen on ESP32_GENERIC, but there
could possibly be other error codes.
To cover all these codes, just check if `ret` is non-0, and in that case
do a `gc_collect()` and retry the init.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/objint.h')
0 files changed, 0 insertions, 0 deletions
