Skip to content

Commit

Permalink
Break out of for loop on success
Browse files Browse the repository at this point in the history
Addresses item 1 of issue dotnet#726
  • Loading branch information
Hugo-Dahl-Tyler authored and akobr committed Mar 18, 2022
1 parent 002256e commit 2af44fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Shared/Utilities.cs
Expand Up @@ -19,6 +19,7 @@ internal static void FileOperationWithRetry(Action operation)
try
{
operation();
break;
}
catch (IOException ex) when (ex.HResult == ProcessCannotAccessFileHR && retriesLeft > 0)
{
Expand Down

0 comments on commit 2af44fc

Please sign in to comment.