Fix to error checking in espressif SSLSocket

This commit is contained in:
Tim Hawes 2021-11-27 12:40:55 +00:00
parent 05e0734157
commit a3c8760d41
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self,
if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) {
mp_raise_espidf_MemoryError();
} else if (ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) {
} else if (err == ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) {
mp_raise_OSError_msg_varg(translate("Failed SSL handshake"));
} else {
mp_raise_OSError_msg_varg(translate("Unhandled ESP TLS error %d %d %x %d"), esp_tls_code, flags, err, result);