-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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 http client configurable timeout usefull when download is slow on server side #4705
add http client configurable timeout usefull when download is slow on server side #4705
Conversation
@igrr @me-no-dev @d-a-v can you provide some feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity how much do you use ?
@d-a-v I've put it to 30s since the wifi router signal is quite bad at my place. |
|
||
ESP8266HTTPUpdate::ESP8266HTTPUpdate(int httpClientTimeout) | ||
{ | ||
this->_http_client_timeout = httpClientTimeout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use constructor body for member init. Instead:
ESP8266HTTPUpdate::ESP8266HTTPUpdate(int httpClientTimeout)
: _http_client_timeout(httpClientTimeout)
{}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.thank you
@@ -103,6 +104,8 @@ class ESP8266HTTPUpdate | |||
|
|||
int _lastError; | |||
bool _rebootOnUpdate = true; | |||
private: | |||
int _http_client_timeout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use camelCase.
This Pull request fixes #1676 referenced on openenergymonitor/EmonESP#3 (fix stream error).