protected override void Dispose(bool disposing)
{
if (!disposing)
{
return;
}
if (this.disposed)
{
return;
}
lock (this.shuttingDownLock)
{
if (this.disposed)
{
return;
}
Logger.Info("ZookeeperConsumerConnector shutting down");
this.disposed = true;
}
try
{
if (this.scheduler != null)
{
this.scheduler.Dispose();
}
if (this.fetcher != null)
{
this.fetcher.Dispose();
}
this.SendShutdownToAllQueues();
if (this.zkClient != null)
{
this.zkClient.Dispose();
}
}
catch (Exception exc)
{
Logger.Debug("Ignoring unexpected errors on shutting down", exc);
}
Logger.Info("ZookeeperConsumerConnector shut down completed");
}