fix(wakeup): fix trailing countdown error
This commit is contained in:
parent
56a910d714
commit
140edc1cb1
@ -205,14 +205,14 @@ do
|
|||||||
}
|
}
|
||||||
|
|
||||||
# sleep until next test interval and increase time counter
|
# sleep until next test interval and increase time counter
|
||||||
if ($targetComputers.Count -gt 0)
|
$connCheckTotalTime += $ConnectivityCheckInterval
|
||||||
|
if ($connCheckTotalTime -le $ConnectivityCheckTimeout -and $targetComputers.Count -gt 0)
|
||||||
{
|
{
|
||||||
for ($i = $ConnectivityCheckInterval; $i -gt 0; $i--) {
|
for ($i = $ConnectivityCheckInterval; $i -gt 0; $i--) {
|
||||||
Write-Progress -Activity "Waiting for next connectivity check..." -SecondsRemaining $i
|
Write-Progress -Activity "Waiting for next connectivity check..." -SecondsRemaining $i
|
||||||
Start-Sleep 1
|
Start-Sleep 1
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Waiting for next connectivity check..." -Completed
|
Write-Progress -Activity "Waiting for next connectivity check..." -Completed
|
||||||
$connCheckTotalTime += $ConnectivityCheckInterval
|
|
||||||
}
|
}
|
||||||
} while ($connCheckTotalTime -le $ConnectivityCheckTimeout -and $targetComputers.Count -gt 0)
|
} while ($connCheckTotalTime -le $ConnectivityCheckTimeout -and $targetComputers.Count -gt 0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user