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 setClientTimeout() to ESP8266HTTPUpdate #8740

Merged
merged 7 commits into from
Dec 6, 2022

Conversation

DarioGHub
Copy link
Contributor

@DarioGHub DarioGHub commented Dec 4, 2022

Shortening up the default hard-coded 8000 ms timeout, will save energy when module can't reach its update server, especially on battery powered projects, and otherwise provide adaptability to the local wlan. The ESPhttpUpdate object is auto-created by #including ESP8266HTTPUpdate. ESP8266HTTPUpdate also provides a constructor with param httpClientTimeout, but to use it required destroying the auto ESPhttpUpdate object, or creating a secondESPhttpUpdate(timeout) object.

Alternative to destroying auto created object ESPhttpUpdate, then recreating it with the constructor that supported a timeout
changed commented setDebugOutput to false to reflect the core 3 behaviour of wifi debug output by default.
Removed a couple of newlines, and the 4 second wait block from setup.
@mcspr mcspr merged commit 9701d3a into esp8266:master Dec 6, 2022
@DarioGHub DarioGHub deleted the dwb_ESP8266HTTPUpdate branch December 6, 2022 13:02
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
Shortening up the default hard-coded 8000 ms timeout, will save energy when module can't reach its update server, especially on battery powered projects, and otherwise provide adaptability to the local wlan. The ESPhttpUpdate object is auto-created by #including ESP8266HTTPUpdate. ESP8266HTTPUpdate also provides a constructor with param httpClientTimeout, but to use it required destroying the auto ESPhttpUpdate object, or creating a secondESPhttpUpdate(timeout) object.
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.

2 participants