1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-18 15:55:46 +00:00
This commit is contained in:
J. Nick Koston
2025-11-17 22:31:53 -06:00
parent 6f96804a5d
commit f0bae783cf

View File

@@ -74,9 +74,10 @@ def _final_validate(config: ConfigType) -> ConfigType:
# Register socket needs for DNS server and additional HTTP connections
# - 1 UDP socket for DNS server
# - 3 additional TCP sockets for captive portal HTTP connections
# OS captive portal detection makes multiple simultaneous probe requests.
# LRU purging will reclaim idle sockets, but we need enough for the initial burst.
# - 3 additional TCP sockets for captive portal detection probes + configuration requests
# OS captive portal detection makes multiple probe requests that stay in TIME_WAIT.
# Need headroom for actual user configuration requests.
# LRU purging will reclaim idle sockets to prevent exhaustion from repeated attempts.
from esphome.components import socket
socket.consume_sockets(4, "captive_portal")(config)