Revert "fixed rabbitmq connection leak"
This reverts commit 633ed22763
.
This commit is contained in:
parent
0952050f8a
commit
c5d4272685
@ -68,13 +68,8 @@ public class DefaultRabbitMQPersistentConnection
|
||||
return;
|
||||
}
|
||||
|
||||
_disposed = true;
|
||||
|
||||
DisposeConnection();
|
||||
}
|
||||
|
||||
private void DisposeConnection()
|
||||
{
|
||||
_disposed = true;
|
||||
|
||||
try
|
||||
{
|
||||
_connection.ConnectionShutdown -= OnConnectionShutdown;
|
||||
@ -85,8 +80,8 @@ public class DefaultRabbitMQPersistentConnection
|
||||
catch (IOException ex)
|
||||
{
|
||||
_logger.CriticalDefaultRabbitMQPersistentConnection(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool TryConnect()
|
||||
{
|
||||
@ -103,12 +98,7 @@ public class DefaultRabbitMQPersistentConnection
|
||||
);
|
||||
|
||||
policy.Execute(() =>
|
||||
{
|
||||
if (_connection != null)
|
||||
{
|
||||
DisposeConnection();
|
||||
}
|
||||
|
||||
{
|
||||
_connection = _connectionFactory
|
||||
.CreateConnection();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user