mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-08 21:51:46 +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")) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user