Skip to content

Commit

Permalink
fix: Use ip address as a string value
Browse files Browse the repository at this point in the history
  • Loading branch information
rumpelsepp committed Dec 5, 2024
1 parent cb60322 commit 2dfbfab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gallia/commands/discover/doip.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,11 @@ async def run_udp_discovery(self) -> list[tuple[str, int]]:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
sock.setblocking(False)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sock.bind((addr.local, 0))
sock.bind((str(addr.local), 0))
loop = asyncio.get_running_loop()

hdr = GenericHeader(0xFF, PayloadTypes.VehicleIdentificationRequestMessage, 0x00)
await loop.sock_sendto(sock, hdr.pack(), (addr.broadcast, 13400))
await loop.sock_sendto(sock, hdr.pack(), (str(addr.broadcast), 13400))
try:
while True:
data, from_addr = await asyncio.wait_for(loop.sock_recvfrom(sock, 1024), 2)
Expand Down

0 comments on commit 2dfbfab

Please sign in to comment.