mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
Simplify host check in socket to_code: use CORE.is_host
This commit is contained in:
@@ -168,11 +168,7 @@ async def to_code(config):
|
||||
# Only when not using lwip_tcp, which does not provide select() support.
|
||||
if (CORE.is_esp32 or CORE.is_libretiny) and impl != IMPLEMENTATION_LWIP_TCP:
|
||||
cg.add_build_flag("-DUSE_LWIP_FAST_SELECT")
|
||||
if (
|
||||
impl == IMPLEMENTATION_BSD_SOCKETS
|
||||
and not CORE.is_esp32
|
||||
and not CORE.is_libretiny
|
||||
):
|
||||
if CORE.is_host:
|
||||
# Host platform: uses select() syscall for socket monitoring
|
||||
# and a UDP loopback socket for wake_loop_threadsafe()
|
||||
consume_sockets(1, "socket.wake_loop_threadsafe", SocketType.UDP)({})
|
||||
|
||||
Reference in New Issue
Block a user