From d328823c03002aa2a72311e461e431e0f56823db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 10 Mar 2022 15:28:06 +0100 Subject: [PATCH] Destroy HTTPS Client on unpack error (#1279) This gives you more than one try to update the embedded Web IF without rebooting the device. This can also be cherry-picked for 1.3 --- src/mesh/http/ContentHandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesh/http/ContentHandler.cpp b/src/mesh/http/ContentHandler.cpp index 72755e62b..0e75736a7 100644 --- a/src/mesh/http/ContentHandler.cpp +++ b/src/mesh/http/ContentHandler.cpp @@ -755,7 +755,7 @@ void handleUpdateSPIFFS(HTTPRequest *req, HTTPResponse *res) if (!TARUnpacker->tarStreamExpander(streamptr, streamSize, SPIFFS, "/static")) { res->printf("tarStreamExpander failed with return code #%d\n", TARUnpacker->tarGzGetError()); Serial.printf("tarStreamExpander failed with return code #%d\n", TARUnpacker->tarGzGetError()); - + client->stop(); return; } else { /* @@ -773,6 +773,7 @@ void handleUpdateSPIFFS(HTTPRequest *req, HTTPResponse *res) } else { res->printf("Failed to establish http connection\n"); Serial.println("Failed to establish http connection"); + client->stop(); return; }