Skip to content

Commit

Permalink
BizHawkClient: Change open_connection to use 127.0.0.1 instead of l…
Browse files Browse the repository at this point in the history
…ocalhost (ArchipelagoMW#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.
  • Loading branch information
Zunawe authored Nov 28, 2023
1 parent f54f862 commit ce2f931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worlds/_bizhawk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce2f931

Please sign in to comment.