Stop processing once an error is detected during bootloader upload

This commit is contained in:
Will Tatam
2025-11-09 12:04:56 +00:00
parent ff93a48926
commit a36638ee6d

View File

@@ -628,6 +628,10 @@ void handleBootloaderOTAData(AsyncWebServerRequest *request, size_t index, uint8
return; return;
} }
if (!context->errorMessage.isEmpty()) {
return;
}
// Buffer the incoming data // Buffer the incoming data
if (context->buffer && context->bytesBuffered + len <= context->maxBootloaderSize) { if (context->buffer && context->bytesBuffered + len <= context->maxBootloaderSize) {
memcpy(context->buffer + context->bytesBuffered, data, len); memcpy(context->buffer + context->bytesBuffered, data, len);