增加HttpConnectTimeoutException
This commit is contained in:
parent
bcc0556fd0
commit
55d5a7a4b8
@ -108,7 +108,7 @@ namespace FastGithub.Http
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
innerExceptions.Add(new SocketException((int)SocketError.TimedOut));
|
||||
innerExceptions.Add(new HttpConnectTimeoutException(ipEndPoint.Address));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
21
FastGithub.Http/HttpConnectTimeoutException.cs
Normal file
21
FastGithub.Http/HttpConnectTimeoutException.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
|
||||
namespace FastGithub.Http
|
||||
{
|
||||
/// <summary>
|
||||
/// http连接超时异常
|
||||
/// </summary>
|
||||
sealed class HttpConnectTimeoutException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// http连接超时异常
|
||||
/// </summary>
|
||||
/// <param name="address">连接的ip</param>
|
||||
public HttpConnectTimeoutException(IPAddress address)
|
||||
: base(address.ToString())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user