Skip to content

Commit

Permalink
fix: Discovery tool
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Feb 10, 2025
1 parent 832b005 commit c4b286c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def main():
wait = True

try:
transport, protocol = await loop.create_datagram_endpoint(lambda: DiscoveryProtocol(addresses), family = socket.AF_INET, allow_broadcast = True),
transport, protocol = await loop.create_datagram_endpoint(lambda: DiscoveryProtocol(addresses), family = socket.AF_INET, allow_broadcast = True)
r = None
while r is None or wait:
r = await asyncio.wait_for(protocol.responses.get(), DISCOVERY_TIMEOUT)
Expand All @@ -46,4 +46,5 @@ async def main():
finally:
transport.close()

asyncio.run(main())
if __name__ == "__main__":
asyncio.run(main())

0 comments on commit c4b286c

Please sign in to comment.