From 306e955a0b71562eea2849c1171b78e777539a9e Mon Sep 17 00:00:00 2001 From: Robert Strouse Date: Fri, 27 Oct 2023 12:08:17 -0700 Subject: [PATCH] Reduce the download buffer size to reduce memory issues. --- GitOTA.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GitOTA.cpp b/GitOTA.cpp index 66f9ed0..96ac3cf 100644 --- a/GitOTA.cpp +++ b/GitOTA.cpp @@ -17,7 +17,7 @@ extern rebootDelay_t rebootDelay; extern Web webServer; -#define MAX_BUFF_SIZE 8192 +#define MAX_BUFF_SIZE 4096 void GitRelease::setProperty(const char *key, const char *val) { if(strcmp(key, "id") == 0) this->id = atol(val); else if(strcmp(key, "draft") == 0) this->draft = toBoolean(val, false); @@ -371,6 +371,7 @@ int8_t GitUpdater::downloadFile() { Serial.printf("End update %s\n", this->currentFile); } + delete client; } return 0; }