Retry http error related to DNS resolution failure. (#4110)

This commit is contained in:
Tingluo Huang
2025-11-13 13:24:09 -05:00
committed by GitHub
parent 334df748d1
commit b3a60e6b06
2 changed files with 5 additions and 4 deletions

View File

@@ -1,14 +1,14 @@
using GitHub.Services.Common.Diagnostics;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using GitHub.Services.Common.Diagnostics;
using GitHub.Services.Common.Internal;
namespace GitHub.Services.Common

View File

@@ -146,6 +146,7 @@ namespace GitHub.Services.Common
sockEx.SocketErrorCode == SocketError.TimedOut ||
sockEx.SocketErrorCode == SocketError.HostDown ||
sockEx.SocketErrorCode == SocketError.HostUnreachable ||
sockEx.SocketErrorCode == SocketError.HostNotFound ||
sockEx.SocketErrorCode == SocketError.TryAgain)
{
return true;