Skip to content

Commit f98b903

Browse files
committed
Never use :: in tests without dual-stack
1 parent 44c31e1 commit f98b903

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: tests/test_asyncio.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ async def run_client(
100100
return response
101101

102102
@contextlib.asynccontextmanager
103-
async def run_server(self, configuration=None, host="::", **kwargs):
103+
async def run_server(self, configuration=None, host=None, **kwargs):
104+
if host is None and not socket.has_dualstack_ipv6():
105+
host = "127.0.0.1"
106+
elif host is None:
107+
host = "::"
104108
if configuration is None:
105109
configuration = QuicConfiguration(is_client=False)
106110
configuration.load_cert_chain(SERVER_CERTFILE, SERVER_KEYFILE)

0 commit comments

Comments
 (0)