Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add server connect timeout to HTTPClient #2606

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Add server connect timeout to HTTPClient #2606

merged 1 commit into from
Apr 9, 2019

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