Skip to content

Conversation

boarchuz
Copy link
Contributor

The existing setTimeout() function is effective only once the client is already connected to the server. Therefore, if there is a problem establishing a connection to the server in the first place (eg. it is offline), connect() will block for up to ~20 seconds regardless of the value passed to setTimeout.
See #1433

This PR introduces a separate, self-explanatory function - setConnectTimeout(int32_t connectTimeout) - to HTTPClient, which simply takes advantage of the WiFiClient connect timeout functionality recently introduced here: #2383

@me-no-dev me-no-dev merged commit dd64980 into espressif:master Apr 9, 2019
@me-no-dev
Copy link
Member

nice!

@tonydee2377
Copy link

Thank you!
with this instruction you have saved me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants