Skip to content

Commit 1fb9b38

Browse files
committed
Fix host:port string interpolation in latency test
1 parent d47b6f8 commit 1fb9b38

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

SystemTester.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ function Test-NetworkLatency {
588588

589589
$targetHost = "8.8.8.8"
590590
$targetPort = 443
591-
$lines = @("Target: $targetHost:$targetPort")
591+
$lines = @("Target: $($targetHost):$targetPort")
592592
$status = "SUCCESS"
593593

594594
# Built-in Test-NetConnection results
@@ -611,7 +611,7 @@ function Test-NetworkLatency {
611611
try {
612612
$pspingPath = Join-Path $SysinternalsPath "psping.exe"
613613
if (Test-Path $pspingPath) {
614-
$args = @("-accepteula", "-n", "5", "$targetHost:$targetPort")
614+
$args = @("-accepteula", "-n", "5", "{0}:{1}" -f $targetHost, $targetPort)
615615
Write-Host "Running PsPing latency test..." -ForegroundColor Yellow
616616
$pspingOutput = & $pspingPath $args 2>&1 | Out-String
617617
$lines += "PsPing Summary:"

0 commit comments

Comments
 (0)