Skip to content

Commit 2ea703c

Browse files
committed
Log listener bind status for TCP as for UDS
1 parent 112ed27 commit 2ea703c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tractor/ipc/_tcp.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ async def start_listener(
127127
Start a TCP socket listener on the given `TCPAddress`.
128128
129129
'''
130+
log.info(
131+
f'Attempting to bind TCP socket\n'
132+
f'>[\n'
133+
f'|_{addr}\n'
134+
)
130135
# ?TODO, maybe we should just change the lower-level call this is
131136
# using internall per-listener?
132137
listeners: list[SocketListener] = await open_tcp_listeners(
@@ -140,6 +145,12 @@ async def start_listener(
140145
assert len(listeners) == 1
141146
listener = listeners[0]
142147
host, port = listener.socket.getsockname()[:2]
148+
149+
log.info(
150+
f'Listening on TCP socket\n'
151+
f'[>\n'
152+
f' |_{addr}\n'
153+
)
143154
return listener
144155

145156

0 commit comments

Comments
 (0)