Skip to content

Commit

Permalink
Introduce non-existing host resolving timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
sanych-sun committed Mar 6, 2024
1 parent 8cc43f0 commit b105625
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/RabbitMQ.Next/Sockets/EndpointResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
using System.Threading;
using System.Threading.Tasks;
using RabbitMQ.Next.Exceptions;
using RabbitMQ.Next.Tasks;

namespace RabbitMQ.Next.Sockets;

internal static class EndpointResolver
{
public static async Task<ISocket> OpenSocketAsync(IReadOnlyList<Endpoint> endpoints, CancellationToken cancellation)
{
cancellation = new CancellationTokenSource(TimeSpan.FromSeconds(10)).Token.Combine(cancellation);
Dictionary<Uri, Exception> exceptions = null;

foreach (var endpoint in endpoints)
Expand Down

0 comments on commit b105625

Please sign in to comment.