1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-29 08:32:26 +01:00
This commit is contained in:
J. Nick Koston
2025-09-26 23:14:28 -05:00
parent 7251f7edec
commit 4b003389b8

View File

@@ -717,15 +717,6 @@ bool ESPHomeOTAComponent::handle_auth_read_() {
const size_t to_read = hex_size * 2; // CNonce + Response const size_t to_read = hex_size * 2; // CNonce + Response
// Initialize buffer if not already done
if (!this->auth_buf_) {
// Note: we're reusing the buffer from handle_auth_send_ which should have the nonce
// But if we reach here without it, something went wrong
this->log_auth_warning_(LOG_STR("Auth buffer not initialized"));
this->cleanup_connection_();
return false;
}
// Try to read remaining bytes (CNonce + Response) // Try to read remaining bytes (CNonce + Response)
// We need to read into the buffer starting after the auth_type (1 byte) and nonce (hex_size bytes) // We need to read into the buffer starting after the auth_type (1 byte) and nonce (hex_size bytes)
size_t offset = 1 + hex_size; size_t offset = 1 + hex_size;