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:
parent
f54f8622bb
commit
ce2f9312ca
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue