-
Notifications
You must be signed in to change notification settings - Fork 613
Closed
Description
Discussed in #1758
Originally posted by JanEggers January 6, 2025
Describe the bug
[TestMethod]
public async Task DisposeWhileCatchingTimeoutDeadlocksRepro()
{
var factory = new ConnectionFactory
{
UserName = "rabbit",
Password = "rabbit",
HostName = "localhost",
VirtualHost = "/",
AutomaticRecoveryEnabled = true
};
var receiveConnection = await factory.CreateConnectionAsync();
try
{
await receiveConnection.CloseAsync(TimeSpan.Zero);
}
catch (Exception e)
{
}
// this blocks forever
await receiveConnection.DisposeAsync();
}
Reproduction steps
see code
Expected behavior
Dispose should never block it must either throw or work
Additional context
Im currently migrating to version from 6.8.1 to 7.0 but this causes my tests to be stuck.