mirror of
https://github.com/Flowseal/zapret-discord-youtube.git
synced 2026-09-06 10:07:00 +00:00
test optimizations
This commit is contained in:
@@ -21,10 +21,11 @@ function Wait-WinwsReady {
|
|||||||
while ($timer.ElapsedMilliseconds -lt 5000) {
|
while ($timer.ElapsedMilliseconds -lt 5000) {
|
||||||
if (Get-Process -Name "winws" -ErrorAction SilentlyContinue) {
|
if (Get-Process -Name "winws" -ErrorAction SilentlyContinue) {
|
||||||
Start-Sleep -Milliseconds 300
|
Start-Sleep -Milliseconds 300
|
||||||
return
|
return $true
|
||||||
}
|
}
|
||||||
Start-Sleep -Milliseconds 200
|
Start-Sleep -Milliseconds 200
|
||||||
}
|
}
|
||||||
|
return $false
|
||||||
}
|
}
|
||||||
|
|
||||||
function Set-IpsetMode {
|
function Set-IpsetMode {
|
||||||
@@ -651,7 +652,11 @@ try {
|
|||||||
$proc = Start-Process -FilePath "cmd.exe" -ArgumentList "/c `"$($file.FullName)`"" -WorkingDirectory $targetDir -PassThru -WindowStyle Minimized
|
$proc = Start-Process -FilePath "cmd.exe" -ArgumentList "/c `"$($file.FullName)`"" -WorkingDirectory $targetDir -PassThru -WindowStyle Minimized
|
||||||
|
|
||||||
# Wait init
|
# Wait init
|
||||||
Wait-WinwsReady
|
if (-not (Wait-WinwsReady)) {
|
||||||
|
Write-Host " > Strategy failed to start (winws process not found). Skipping..." -ForegroundColor Red
|
||||||
|
if (-not $proc.HasExited) { Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue }
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if ($testType -eq 'standard') {
|
if ($testType -eq 'standard') {
|
||||||
$curlTimeoutSeconds = $standardCurlTimeout
|
$curlTimeoutSeconds = $standardCurlTimeout
|
||||||
|
|||||||
Reference in New Issue
Block a user