Skip to content

Commit

Permalink
Never use :: in tests without dual-stack
Browse files Browse the repository at this point in the history
  • Loading branch information
catap committed Jul 8, 2024
1 parent 44c31e1 commit b4ce22b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/aioquic/asyncio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def connect(
0-RTT.
* ``local_port`` is the UDP port number that this client wants to bind.
* ``dual_stack`` is a flag which enabled or disabled using IPv4/IPv6 Dual-Stack.
The default value is platform specific and similar with socket.has_dualstack_ipv6().
The default value is platform specific and similar to socket.has_dualstack_ipv6()
"""
loop = asyncio.get_event_loop()

Expand Down
6 changes: 5 additions & 1 deletion tests/test_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ async def run_client(
return response

@contextlib.asynccontextmanager
async def run_server(self, configuration=None, host="::", **kwargs):
async def run_server(self, configuration=None, host=None, **kwargs):
if host is None and not socket.has_dualstack_ipv6():
host = "127.0.0.1"
elif host is None:
host = "::"
if configuration is None:
configuration = QuicConfiguration(is_client=False)
configuration.load_cert_chain(SERVER_CERTFILE, SERVER_KEYFILE)
Expand Down

0 comments on commit b4ce22b

Please sign in to comment.