ESPHome prevents short web requests from piling up closed connections in memory on Realtek RTL87xx and LN882x devices. A flood of requests could exhaust the heap and restart the device; the connections are now released after about a second rather than 120 seconds.
In J. Nick Koston’s tests, 600 requests at roughly three per second previously held about 60 KB on a BW15 board. With the correction, memory on the BW15 and LN882H stayed within about 2 KB of idle and recovered in one to two seconds. Beken devices already used the shorter wait. Separate failures caused by very large request headers remain outside this correction.