Skip to content

Commit

Permalink
tests: Wait for either IPv4 or IPv6 Port
Browse files Browse the repository at this point in the history
  • Loading branch information
holesch committed Aug 16, 2024
1 parent a70fc83 commit e3335af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ async def wait_for_ports(*ports, timeout=7): # noqa: ASYNC109
while True:
try:
for port in ports:
async with util.connect("127.0.0.1", port):
async with util.connect("localhost", port):
pass
except ConnectionRefusedError:
except (ConnectionRefusedError, OSError):
await asyncio.sleep(0.1)
continue
break
Expand Down

0 comments on commit e3335af

Please sign in to comment.