From 5d44a556a4663f03ca1f8ad0f500a2613657f61b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 21 Feb 2026 14:15:52 -0600 Subject: [PATCH] [socket] Increase MIN_UDP_SOCKETS from 6 to 8 Now that DHCP+DNS are tracked as wifi.lwip_internal UDP consumers, the old minimum of 6 only left 4 free PCBs. Bumping to 8 restores the same effective headroom as before (6 free after DHCP+DNS). Co-Authored-By: Claude Opus 4.6 --- esphome/components/libretiny/__init__.py | 2 +- esphome/components/socket/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/libretiny/__init__.py b/esphome/components/libretiny/__init__.py index e6715cdf236..aeb29668f80 100644 --- a/esphome/components/libretiny/__init__.py +++ b/esphome/components/libretiny/__init__.py @@ -308,7 +308,7 @@ def _configure_lwip(config: dict) -> None: **** RTL/LN LT overlay overrides to flat 7. ***** Not defined in RTL SDK — lwIP opt.h defaults shown. "dynamic" = auto-calculated from component socket registrations via - socket.get_socket_counts() with minimums of 10 TCP / 6 UDP. + socket.get_socket_counts() with minimums of 10 TCP / 8 UDP. """ from esphome.components.socket import ( MIN_TCP_SOCKETS, diff --git a/esphome/components/socket/__init__.py b/esphome/components/socket/__init__.py index 5ece7a97951..fdecda8c4a3 100644 --- a/esphome/components/socket/__init__.py +++ b/esphome/components/socket/__init__.py @@ -23,7 +23,7 @@ KEY_SOCKET_CONSUMERS_UDP = "socket_consumers_udp" # Recommended minimum socket counts to ensure headroom # Platforms should apply these (or their own) on top of get_socket_counts() MIN_TCP_SOCKETS = 10 -MIN_UDP_SOCKETS = 6 +MIN_UDP_SOCKETS = 8 # Wake loop threadsafe support tracking KEY_WAKE_LOOP_THREADSAFE_REQUIRED = "wake_loop_threadsafe_required"