Warn if `.ipc._uds.get_peer_pid()` returns null

ns_aware
Gud Boi 2026-03-08 18:06:43 -04:00
parent 70efcb09a0
commit daae196048
1 changed files with 7 additions and 1 deletions

View File

@ -545,7 +545,13 @@ class MsgpackUDSStream(MsgpackTransport):
# NOTE known to at least works on, # NOTE known to at least works on,
# - macos # - macos
else: else:
peer_pid: int = get_peer_pid(sock) peer_pid: int|None = get_peer_pid(sock)
if peer_pid is None:
log.warning(
f'Unable to get peer PID?\n'
f'sock: {sock!r}\n'
f'peer_pid: {peer_pid!r}\n'
)
filedir, filename = unwrap_sockpath(sock_path) filedir, filename = unwrap_sockpath(sock_path)
laddr = UDSAddress( laddr = UDSAddress(