private DisconnectEventHandler ( IConnection connection, RabbitMQ.Client.ShutdownEventArgs eventArgs ) : void | ||
connection | IConnection | |
eventArgs | RabbitMQ.Client.ShutdownEventArgs | |
return | void |
private void DisconnectEventHandler(IConnection connection, ShutdownEventArgs eventArgs)
{
Task.Factory.StartNew(
() =>
{
connection.ConnectionShutdown -= this.DisconnectEventHandler;
this.OnDisconnected();
this.HandleBusFailure(new BusConnectionException("Connection was shut down on [{0}].".FormatEx(this.Endpoint)));
});
}