Fixed OTA Ethernet bug
All checks were successful
Test compiling project / test (push) Successful in 2m28s

This commit is contained in:
2025-02-23 02:38:59 +01:00
parent 2c4344e40d
commit 146a4412e0
6 changed files with 73 additions and 17 deletions

View File

@@ -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));