Brace the UDP decline log

This commit is contained in:
J. Nick Koston
2026-10-10 13:09:32 -10:00
parent 5faadcdbf8
commit 37d4bbb72f
@@ -534,8 +534,9 @@ void ESPHomeOTAComponent::handle_data_() {
// 1 is this UDP format; other values are free for later ones, which we decline (a zero reply keeps TCP)
if (buf[0] == UDP_REQUEST_V1) {
this->udp_open_(udp_link);
if (udp_link.reply[0] == 0)
if (udp_link.reply[0] == 0) {
ESP_LOGW(TAG, "UDP unavailable, using TCP");
}
}
if (!this->data_write_(udp_link.reply, sizeof(udp_link.reply)))
goto error; // NOLINT(cppcoreguidelines-avoid-goto)