protected virtual void Dispose(bool disposing)
{
if (this.disposeInProgress)
{
return;
}
this.disposeInProgress = true;
try
{
this.ResetTimeout(1000);
if (disposing)
{
this.handler.Close(this.isOpen);
}
if (this.connectionString.Pooling)
{
MySqlPoolManager.RemoveConnection(this);
}
}
catch (Exception)
{
if (disposing)
{
throw;
}
}
finally
{
this.reader = null;
this.isOpen = false;
this.disposeInProgress = false;
}
}