[OTA] Fix http timeout (#1736)
Time should be in milli seconds not in seconds
This commit is contained in:
1 parent
9caccbd14c
commit
d1e92137dd
1 file changed
+1
-1
+1
-1
@@ -2438,7 +2438,7 @@ String latestVersion;
|
|||||||
bool checkForUpdates() {
|
bool checkForUpdates() {
|
||||||
Log.notice(F("Update check, free heap: %d"), ESP.getFreeHeap());
|
Log.notice(F("Update check, free heap: %d"), ESP.getFreeHeap());
|
||||||
HTTPClient http;
|
HTTPClient http;
|
||||||
http.setTimeout(GeneralTimeOut - 1); // -1 to avoid WDT
|
http.setTimeout((GeneralTimeOut - 1) * 1000); // -1 to avoid WDT
|
||||||
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
|
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
|
||||||
http.begin(OTA_JSON_URL, OTAserver_cert);
|
http.begin(OTA_JSON_URL, OTAserver_cert);
|
||||||
int httpCode = http.GET();
|
int httpCode = http.GET();
|
||||||
|
|||||||
Reference in new issue
Block a user