From 770e3092a5cfaff89d4e7de31aa660b5de8ca82c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 21 Feb 2026 15:54:42 -0600 Subject: [PATCH] [libretiny] Fix MEMP_NUM_NETCONN double-counting listening sockets Listening sockets are already included in the TCP socket count from component registrations (e.g. api registers 1 listening + 3 clients). Remove the extra listening_tcp from MEMP_NUM_NETCONN to avoid over-provisioning. Co-Authored-By: Claude Opus 4.6 --- esphome/components/libretiny/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/libretiny/__init__.py b/esphome/components/libretiny/__init__.py index 8095f6e341..4e73ac9542 100644 --- a/esphome/components/libretiny/__init__.py +++ b/esphome/components/libretiny/__init__.py @@ -360,8 +360,8 @@ def _configure_lwip(config: dict) -> None: f"MEMP_NUM_TCP_PCB={tcp_sockets}", # BK: 12, RTL: 10, LN: 8 # UDP PCB pool — includes wifi.lwip_internal (DHCP + DNS) f"MEMP_NUM_UDP_PCB={udp_sockets}", # BK: 25, RTL/LN: 7 via LT - # Netconn pool — sum of all socket types - f"MEMP_NUM_NETCONN={tcp_sockets + listening_tcp + udp_sockets}", + # Netconn pool — listening sockets are already counted in tcp_sockets + f"MEMP_NUM_NETCONN={tcp_sockets + udp_sockets}", # Netbuf pool "MEMP_NUM_NETBUF=4", # BK: 16, RTL: 2 (opt.h), LN: 8 # Inbound message pool