Let PortOpen() return true when netstat command could not be run, to prevent loops with broken commands

This commit is contained in:
Ansgar Becker
2025-10-07 20:05:45 +02:00
parent 0d319d633b
commit d930ecf5da

View File

@@ -2844,7 +2844,7 @@ begin
{$IfDef WINDOWS}
// netstat on Windows
CmdResult := RunCommand('netstat -na -p TCP', Output);
Result := not Output.Contains(':' + Port.ToString + ' ');
Result := (not CmdResult) or (not Output.Contains(':' + Port.ToString + ' '));
{$EndIf}
end;