From d930ecf5da486a94db05b9ef9aabffad61748014 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 7 Oct 2025 20:05:45 +0200 Subject: [PATCH] Let PortOpen() return true when netstat command could not be run, to prevent loops with broken commands --- source/apphelpers.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/apphelpers.pas b/source/apphelpers.pas index 3ea8b184..88e968a2 100644 --- a/source/apphelpers.pas +++ b/source/apphelpers.pas @@ -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;