Fixed OTA Ethernet bug
All checks were successful
Test compiling project / test (push) Successful in 2m28s
All checks were successful
Test compiling project / test (push) Successful in 2m28s
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <ArduinoLog.h>
|
||||
#include <HTTPUpdate.h>
|
||||
|
||||
|
||||
OTA::OTA(String server_url, Version currentVersion, String currentDeviceConfiguration) {
|
||||
_serverUrl = server_url;
|
||||
_currentVersion = currentVersion;
|
||||
@@ -21,6 +22,7 @@ Firmware OTA::getLatestVersionOnServer() {
|
||||
HTTPClient http;
|
||||
http.begin(_serverUrl);
|
||||
int httpCode = http.GET();
|
||||
Log.verbose("HTTP Code: %d", httpCode);
|
||||
|
||||
if (httpCode != 200) {
|
||||
return createErrorResponse("HTTP GET request failed with code " + String(httpCode));
|
||||
|
||||
Reference in New Issue
Block a user