Skip to content

Commit

Permalink
Avoid retrying when the hostname cannot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers committed Jun 21, 2022
1 parent 90927d2 commit 82e6b12
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/PnP.Framework/Extensions/ClientContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,13 @@ private static async Task ExecuteQueryImplementation(ClientRuntimeContext client
errorSb.AppendLine($"SocketErrorCode: {socketEx.SocketErrorCode}"); //ConnectionReset
errorSb.AppendLine($"Message: {socketEx.Message}"); //An existing connection was forcibly closed by the remote host
Log.Error(Constants.LOGGING_SOURCE, CoreResources.ClientContextExtensions_ExecuteQueryRetryException, errorSb.ToString());


// Hostname unknown error code 11001 should not be retried
if(socketEx.ErrorCode == 11001)
{
throw;
}

//retry
wrapper = (ClientRequestWrapper)wex.Data["ClientRequest"];
retry = true;
Expand Down

0 comments on commit 82e6b12

Please sign in to comment.