[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 <noreply@anthropic.com>
This commit is contained in:
J. Nick Koston
2026-02-21 15:54:42 -06:00
parent e463dc331e
commit 770e3092a5

View File

@@ -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