diff --git a/src/RabbitMQ.Next/Sockets/EndpointResolver.cs b/src/RabbitMQ.Next/Sockets/EndpointResolver.cs index 2e81070..2474e1e 100644 --- a/src/RabbitMQ.Next/Sockets/EndpointResolver.cs +++ b/src/RabbitMQ.Next/Sockets/EndpointResolver.cs @@ -8,6 +8,7 @@ using System.Threading; using System.Threading.Tasks; using RabbitMQ.Next.Exceptions; +using RabbitMQ.Next.Tasks; namespace RabbitMQ.Next.Sockets; @@ -15,6 +16,7 @@ internal static class EndpointResolver { public static async Task OpenSocketAsync(IReadOnlyList endpoints, CancellationToken cancellation) { + cancellation = new CancellationTokenSource(TimeSpan.FromSeconds(10)).Token.Combine(cancellation); Dictionary exceptions = null; foreach (var endpoint in endpoints)