BizHawkClient: Change `open_connection` to use 127.0.0.1 instead of localhost (#2525)

When using localhost on mac, both ipv4 and ipv6 are tried and raise separate errors
which are combined by asyncio and difficult/inelegant to handle.

Python 3.12 adds the argument all_errors, which would make this easier.
This commit is contained in:
Bryce Wilson 2023-11-28 13:50:12 -08:00 committed by GitHub
parent f54f8622bb
commit ce2f9312ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ async def connect(ctx: BizHawkContext) -> bool:
for port in ports:
try:
ctx.streams = await asyncio.open_connection("localhost", port)
ctx.streams = await asyncio.open_connection("127.0.0.1", port)
ctx.connection_status = ConnectionStatus.TENTATIVE
ctx._port = port
return True