2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-03-20 09:09:37 +00:00

Fix socket being in blocking mode before async calls.

This commit is contained in:
Jarrod Johnson
2026-03-02 08:33:34 -05:00
parent 289a6a6af8
commit c8fcb716fb

View File

@@ -776,6 +776,7 @@ async def get_my_addresses(idx=0, family=0, matchlla=None):
ifaddrmsg = struct.pack('BBBBI', family, 0, 0, 0, idx)
s = socket.socket(socket.AF_NETLINK, socket.SOCK_RAW, socket.NETLINK_ROUTE)
s.bind((0, 0))
s.setblocking(False)
await asyncio.get_event_loop().sock_sendall(s, nlhdr + ifaddrmsg)
addrs = []
while True: