-
Notifications
You must be signed in to change notification settings - Fork 613
Closed
Milestone
Description
Describe the bug
Looks like ConnectionFactory.RequestedHeartbeat
no longer accept Timespan.Zero as documented
/// <summary>
/// Default value for desired heartbeat interval. Default is 60 seconds,
/// TimeSpan.Zero means "heartbeats are disabled".
/// </summary>
RabbitMQ.Client.Exceptions.BrokerUnreachableException : None of the specified endpoints were reachable
----> System.AggregateException : One or more errors occurred. (Timeout can be only be set to 'System.Threading.Timeout.Infinite' or a value > 0. (Parameter 'value'))
----> System.ArgumentOutOfRangeException : Timeout can be only be set to 'System.Threading.Timeout.Infinite' or a value > 0. (Parameter 'value')
at RabbitMQ.Client.ConnectionFactory.CreateConnectionAsync(IEndpointResolver endpointResolver, String clientProvidedName, CancellationToken cancellationToken)
Crash in ConfigureFrameHandler
this line
fh.ReadTimeout = RequestedHeartbeat;
Reproduction steps
var connectionFactory = new ConnectionFactory
{
Uri = uri,
AutomaticRecoveryEnabled = true,
RequestedHeartbeat = TimeSpan.Zero,
};
_connection = await connectionFactory.CreateConnectionAsync("some-name");
Expected behavior
Should not crash, or crash with a clear error message if this is not valid anymore.
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels