diff --git a/libraries/ESP8266httpUpdate/examples/httpUpdate/httpUpdate.ino b/libraries/ESP8266httpUpdate/examples/httpUpdate/httpUpdate.ino index b9da7f8cb4..ed7f38f61b 100644 --- a/libraries/ESP8266httpUpdate/examples/httpUpdate/httpUpdate.ino +++ b/libraries/ESP8266httpUpdate/examples/httpUpdate/httpUpdate.ino @@ -27,7 +27,7 @@ void setup() { Serial.println(); - ESPhttpUpdate.setClientTimeout(2000); // default was 8000 + ESPhttpUpdate.setWallTime(2000); // default was 8000 WiFi.mode(WIFI_STA); WiFiMulti.addAP(APSSID, APPSK); diff --git a/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp b/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp index 532cfc8fb0..256d971560 100755 --- a/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp +++ b/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp @@ -28,12 +28,12 @@ #include ESP8266HTTPUpdate::ESP8266HTTPUpdate(void) - : _httpClientTimeout(8000) + : _httpWallTime(8000) { } -ESP8266HTTPUpdate::ESP8266HTTPUpdate(int httpClientTimeout) - : _httpClientTimeout(httpClientTimeout) +ESP8266HTTPUpdate::ESP8266HTTPUpdate(int httpWallTime) + : _httpWallTime(httpWallTime) { } @@ -164,7 +164,7 @@ HTTPUpdateResult ESP8266HTTPUpdate::handleUpdate(HTTPClient& http, const String& // use HTTP/1.0 for update since the update handler not support any transfer Encoding http.useHTTP10(true); - http.setWallTime(_httpClientWallTime); + http.setWallTime(_httpWallTime); http.setFollowRedirects(_followRedirects); http.setUserAgent(F("ESP8266-http-Update")); http.addHeader(F("x-ESP8266-Chip-ID"), String(ESP.getChipId())); diff --git a/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.h b/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.h index 39eb88f128..45ae03349f 100755 --- a/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.h +++ b/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.h @@ -153,7 +153,7 @@ class ESP8266HTTPUpdate String _auth; String _md5Sum; private: - int _httpClientTimeout; + unsigned long _httpWallTime; followRedirects_t _followRedirects = HTTPC_DISABLE_FOLLOW_REDIRECTS; // Callbacks