private void PerformBackoff(int retryCount, Random random)
{
int increment = (int)((Math.Pow(2, retryCount - 1) - 1) *
random.Next((int)(BackOff.TotalMilliseconds * 0.8), (int)(BackOff.TotalMilliseconds * 1.2)));
int sleepMsec = (int)Math.Min(MinBackOff.TotalMilliseconds + increment, MaxBackOff.TotalMilliseconds);
Thread.Sleep(sleepMsec);
}
}