private int GetDelaySecond(int errorCount) { //errorCount = errorCount > 0 ? errorCount - 1 : errorCount; var retryStrategy = _options.GetRetryStrategy(); if (errorCount < retryStrategy.Length) { return(retryStrategy[errorCount]); } return(retryStrategy[retryStrategy.Length - 1]); }