Skip to content

Commit

Permalink
Add an additional timeout handler for mac-errors (#7880)
Browse files Browse the repository at this point in the history
* flatten down the timeout handling
  • Loading branch information
scbedd authored Mar 15, 2024
1 parent 50754b5 commit d624400
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,21 +232,17 @@ public bool IsRetriableGitError(CommandResult result)
return true;
}

// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443: Connection timed out
if (result.StdErr.Contains("Failed to connect to github.com port 443: Connection timed out"))
// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443 after 21019 ms: Couldn't connect to server
var regex = new Regex(@"Failed to connect to github.com port 443 after [\d]+ ms: Couldn't connect to server");
if (regex.IsMatch(result.StdErr))
{
return true;
}

// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443: Operation timed out
if (result.StdErr.Contains("Failed to connect to github.com port 443: Operation timed out"))
{
return true;
}

// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443 after 21019 ms: Couldn't connect to server
var regex = new Regex(@"Failed to connect to github.com port 443 after [\d]+ ms: Couldn't connect to server");
if (regex.IsMatch(result.StdErr))
// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443: Connection timed out
// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Recv failure: Operation timed out
if (result.StdErr.Contains("timed out"))
{
return true;
}
Expand Down

0 comments on commit d624400

Please sign in to comment.