mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-29 10:09:11 +03:00
AsyncTCP changes
This commit is contained in:
@@ -172,7 +172,7 @@ void UploadFileService::handleError(AsyncWebServerRequest * request, int code) {
|
|||||||
// check for invalid extension and immediately kill the connection, which will throw an error
|
// check for invalid extension and immediately kill the connection, which will throw an error
|
||||||
// that is caught by the web code. Unfortunately the http error code is not sent to the client on fast network connections
|
// that is caught by the web code. Unfortunately the http error code is not sent to the client on fast network connections
|
||||||
if (code == 406) {
|
if (code == 406) {
|
||||||
request->client()->close(true);
|
request->client()->close();
|
||||||
_is_firmware = false;
|
_is_firmware = false;
|
||||||
Update.abort();
|
Update.abort();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -308,8 +308,7 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
|
|||||||
// if we encountered an invalid GPIO, rollback changes and don't save settings, and report the error to WebUI
|
// if we encountered an invalid GPIO, rollback changes and don't save settings, and report the error to WebUI
|
||||||
if (!have_valid_gpios) {
|
if (!have_valid_gpios) {
|
||||||
// replace settings with original settings
|
// replace settings with original settings
|
||||||
settings = original_settings; // the original settings are still valid
|
settings = original_settings;
|
||||||
// restore the GPIOs from the snapshot
|
|
||||||
EMSESP::system_.restore_snapshot_gpios(used_gpios, system_gpios);
|
EMSESP::system_.restore_snapshot_gpios(used_gpios, system_gpios);
|
||||||
|
|
||||||
// report the error to WebUI
|
// report the error to WebUI
|
||||||
|
|||||||
Reference in New Issue
Block a user