mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-09 06:01:32 +00:00
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
This commit is contained in:
parent
7178d3a2fd
commit
d328823c03
@ -755,7 +755,7 @@ void handleUpdateSPIFFS(HTTPRequest *req, HTTPResponse *res)
|
|||||||
if (!TARUnpacker->tarStreamExpander(streamptr, streamSize, SPIFFS, "/static")) {
|
if (!TARUnpacker->tarStreamExpander(streamptr, streamSize, SPIFFS, "/static")) {
|
||||||
res->printf("tarStreamExpander failed with return code #%d\n", TARUnpacker->tarGzGetError());
|
res->printf("tarStreamExpander failed with return code #%d\n", TARUnpacker->tarGzGetError());
|
||||||
Serial.printf("tarStreamExpander failed with return code #%d\n", TARUnpacker->tarGzGetError());
|
Serial.printf("tarStreamExpander failed with return code #%d\n", TARUnpacker->tarGzGetError());
|
||||||
|
client->stop();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
@ -773,6 +773,7 @@ void handleUpdateSPIFFS(HTTPRequest *req, HTTPResponse *res)
|
|||||||
} else {
|
} else {
|
||||||
res->printf("Failed to establish http connection\n");
|
res->printf("Failed to establish http connection\n");
|
||||||
Serial.println("Failed to establish http connection");
|
Serial.println("Failed to establish http connection");
|
||||||
|
client->stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user