fix: 修复连接错误 (#6607)

This commit is contained in:
MistEO
2023-10-01 14:10:31 +08:00
committed by GitHub

View File

@@ -1280,7 +1280,10 @@ namespace MaaWpfGui.Main
}
string host = addresses[0].Equals("emulator") ? "127.0.0.1" : addresses[0];
int port = int.Parse(addresses[1]);
if (!int.TryParse(addresses[1], out int port))
{
return false;
}
using var client = new TcpClient();
try