Skip to content

secureClient.connect(SERVER_DOMAIN, 443) takes long time at handshake.  #2041

Closed
@a-c-sreedhar-reddy

Description

@a-c-sreedhar-reddy

Hardware:

Board: ESP32 Dev Module
IDE name: Arduino IDE
Upload Speed: 115200
Computer OS: Windows 10

Description:

I would like to POST data to a server every 10 sec. But after some requests the program enters this loop

    log_v("Performing the SSL/TLS handshake...");
    while ((ret = mbedtls_ssl_handshake(&ssl_client->ssl_ctx)) != 0) {
        if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
            return handle_error(ret);
        }
	vTaskDelay(10 / portTICK_PERIOD_MS);
    }

in ssl_client.cpp and it never exits.
So is it good to have a timeout for this WHILE loop?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions