Skip to content

Commit

Permalink
fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v committed Apr 4, 2023
1 parent 6182300 commit ac9d961
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
#include <flash_hal.h>

ESP8266HTTPUpdate::ESP8266HTTPUpdate(void)
: _httpClientTimeout(8000)
: _httpWallTime(8000)
{
}

ESP8266HTTPUpdate::ESP8266HTTPUpdate(int httpClientTimeout)
: _httpClientTimeout(httpClientTimeout)
ESP8266HTTPUpdate::ESP8266HTTPUpdate(int httpWallTime)
: _httpWallTime(httpWallTime)
{
}

Expand Down Expand Up @@ -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()));
Expand Down
2 changes: 1 addition & 1 deletion libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class ESP8266HTTPUpdate
String _auth;
String _md5Sum;
private:
int _httpClientTimeout;
unsigned long _httpWallTime;
followRedirects_t _followRedirects = HTTPC_DISABLE_FOLLOW_REDIRECTS;

// Callbacks
Expand Down

0 comments on commit ac9d961

Please sign in to comment.