Skip to content

Commit

Permalink
#1012 : Add check to cap the timeout to int max.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellwest committed Jun 2, 2018
1 parent cd5e87f commit df91d4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/SPE/New-ScriptSession.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function New-ScriptSession {
}

if ($Timeout -gt 0) {
$serviceProxy.Timeout = $Timeout * 1000
$serviceProxy.Timeout = [math]::Min($Timeout * 1000, [int]::MaxValue)
}

if (!$serviceProxy.Url.StartsWith($uri.Scheme + "://")) {
Expand Down

0 comments on commit df91d4f

Please sign in to comment.