Fix custom config import

https://github.com/2dust/v2rayN/issues/9902
This commit is contained in:
2dust
2026-08-06 09:29:33 +08:00
parent 1034ce6e02
commit 9638b4c368
4 changed files with 31 additions and 11 deletions
+2 -2
View File
@@ -753,11 +753,11 @@ public class Utils
return false;
}
public static int GetFreePort(int defaultPort = 0)
public static int GetFreePort(int defaultPort)
{
try
{
if (!(defaultPort == 0 || Utils.PortInUse(defaultPort)))
if (!PortInUse(defaultPort))
{
return defaultPort;
}