Log listener bind status for TCP as for UDS

structural_dynamics_of_flow
Tyler Goodlet 2025-06-11 11:29:23 -04:00
parent 112ed27cda
commit 2ea703cc75
1 changed files with 11 additions and 0 deletions

View File

@ -127,6 +127,11 @@ async def start_listener(
Start a TCP socket listener on the given `TCPAddress`.
'''
log.info(
f'Attempting to bind TCP socket\n'
f'>[\n'
f'|_{addr}\n'
)
# ?TODO, maybe we should just change the lower-level call this is
# using internall per-listener?
listeners: list[SocketListener] = await open_tcp_listeners(
@ -140,6 +145,12 @@ async def start_listener(
assert len(listeners) == 1
listener = listeners[0]
host, port = listener.socket.getsockname()[:2]
log.info(
f'Listening on TCP socket\n'
f'[>\n'
f' |_{addr}\n'
)
return listener